\input{preamble}

% OK, start here.
%
\begin{document}

\title{More on Morphisms of Spaces}


\maketitle

\phantomsection
\label{section-phantom}

\tableofcontents

\section{Introduction}
\label{section-introduction}

\noindent
In this chapter we continue our study of properties of morphisms of algebraic
spaces. A fundamental reference is \cite{Kn}.





\section{Conventions}
\label{section-conventions}

\noindent
The standing assumption is that all schemes are contained in
a big fppf site $\Sch_{fppf}$. And all rings $A$ considered
have the property that $\Spec(A)$ is (isomorphic) to an
object of this big site.

\medskip\noindent
Let $S$ be a scheme and let $X$ be an algebraic space over $S$.
In this chapter and the following we will write $X \times_S X$
for the product of $X$ with itself (in the category of algebraic
spaces over $S$), instead of $X \times X$.








\section{Radicial morphisms}
\label{section-radicial}

\noindent
It turns out that a radicial morphism is not the same thing as a
universally injective morphism, contrary to what happens with
morphisms of schemes. In fact it is a bit stronger.

\begin{definition}
\label{definition-radicial}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. We say $f$ is {\it radicial} if for any morphism
$\Spec(K) \to Y$ where $K$ is a field the reduction
$(\Spec(K) \times_Y X)_{red}$ is either empty or
representable by the spectrum of a purely inseparable field extension of $K$.
\end{definition}

\begin{lemma}
\label{lemma-radicial-implies-universally-injective}
A radicial morphism of algebraic spaces is universally injective.
\end{lemma}

\begin{proof}
Let $S$ be a scheme. Let $f : X \to Y$ be a radicial
morphism of algebraic spaces over $S$.
It is clear from the definition that given a morphism
$\Spec(K) \to Y$ there is at most one lift of this morphism
to a morphism into $X$. Hence we conclude that $f$ is universally
injective by
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-universally-injective}.
\end{proof}

\begin{example}
\label{example-universally-injective-not-radicial}
It is no longer true that universally injective is equivalent to radicial.
For example the morphism
$$
X = [\Spec(\overline{\mathbf{Q}})/
\text{Gal}(\overline{\mathbf{Q}}/\mathbf{Q})]
\longrightarrow
S = \Spec(\mathbf{Q})
$$
of
Spaces, Example \ref{spaces-example-Qbar}
is universally injective, but is not radicial in the sense above.
\end{example}

\noindent
Nonetheless it is often the case that the reverse implication holds.

\begin{lemma}
\label{lemma-when-universally-injective-radicial}
Let $S$ be a scheme. Let $f : X \to Y$ be a universally injective
morphism of algebraic spaces over $S$.
\begin{enumerate}
\item If $f$ is decent then $f$ is radicial.
\item If $f$ is quasi-separated then $f$ is radicial.
\item If $f$ is locally separated then $f$ is radicial.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $\mathcal{P}$ be a property of morphisms of algebraic spaces
which is stable under base change and composition and holds for
closed immersions. Assume $f : X \to Y$ has $\mathcal{P}$ and
is universally injective. Then, in the situation of
Definition \ref{definition-radicial}
the morphism $(\Spec(K) \times_Y X)_{red} \to \Spec(K)$
is universally injective and has $\mathcal{P}$. This reduces the
problem of proving
$$
\mathcal{P} + \text{universally injective}
\Rightarrow
\text{radicial}
$$
to the problem of proving that any nonempty reduced algebraic space $X$
over field whose structure morphism $X \to \Spec(K)$ is universally
injective and $\mathcal{P}$ is representable by the spectrum of a field.
Namely, then $X \to \Spec(K)$ will be a morphism of schemes and
we conclude by the equivalence of radicial and universally injective for
morphisms of schemes, see
Morphisms, Lemma \ref{morphisms-lemma-universally-injective}.

\medskip\noindent
Let us prove (1). Assume $f$ is decent and universally injective. By
Decent Spaces,
Lemmas \ref{decent-spaces-lemma-base-change-relative-conditions},
\ref{decent-spaces-lemma-composition-relative-conditions}, and
\ref{decent-spaces-lemma-properties-trivial-implications}
(to see that an immersion is decent) we see that the discussion in
the first paragraph applies.
Let $X$ be a nonempty decent reduced algebraic space
universally injective over a field $K$. In particular we see that $|X|$
is a singleton. By
Decent Spaces, Lemma \ref{decent-spaces-lemma-when-field}
we conclude that $X \cong \Spec(L)$ for some extension
$K \subset L$ as desired.

\medskip\noindent
A quasi-separated morphism is decent, see
Decent Spaces,
Lemma \ref{decent-spaces-lemma-properties-trivial-implications}.
Hence (1) implies (2).

\medskip\noindent
Let us prove (3).
Recall that the separation axioms are stable under base change
and composition and that closed immersions are separated, see
Morphisms of Spaces,
Lemmas \ref{spaces-morphisms-lemma-base-change-separated},
\ref{spaces-morphisms-lemma-composition-separated}, and
\ref{spaces-morphisms-lemma-immersions-monomorphisms}.
Thus the discussion in the first paragraph of the proof applies.
Let $X$ be a reduced algebraic space universally injective and
locally separated over a field $K$.
In particular $|X|$ is a singleton hence $X$ is quasi-compact, see
Properties of Spaces, Lemma \ref{spaces-properties-lemma-quasi-compact-space}.
We can find a surjective \'etale morphism $U \to X$ with $U$ affine, see
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-quasi-compact-affine-cover}.
Consider the morphism of schemes
$$
j :
U \times_X U
\longrightarrow
U \times_{\Spec(K)} U
$$
As $X \to \Spec(K)$ is universally injective $j$ is surjective,
and as $X \to \Spec(K)$ is locally separated $j$ is an immersion.
A surjective immersion is a closed immersion, see
Schemes, Lemma \ref{schemes-lemma-immersion-when-closed}.
Hence $R = U \times_X U$ is affine as a closed subscheme of an affine scheme.
In particular $R$ is quasi-compact.
It follows that $X = U/R$ is quasi-separated, and the result follows from (2).
\end{proof}

\begin{remark}
\label{remark-weakly-radicial}
Let $X \to Y$ be a morphism of algebraic spaces.
For some applications (of radicial morphisms)
it is enough to require that for every
$\Spec(K) \to Y$ where $K$ is a field
\begin{enumerate}
\item the space $|\Spec(K) \times_Y X|$ is a singleton,
\item there exists a monomorphism
$\Spec(L) \to \Spec(K) \times_Y X$, and
\item $K \subset L$ is purely inseparable.
\end{enumerate}
If needed later we will may call such a morphism {\it weakly radicial}.
For example if $X \to Y$ is a surjective weakly radicial morphism
then $X(k) \to Y(k)$ is surjective for every algebraically closed field $k$.
Note that the base change
$X_{\overline{\mathbf{Q}}} \to \Spec(\overline{\mathbf{Q}})$
of the morphism in
Example \ref{example-universally-injective-not-radicial}
is weakly radicial, but not radicial. The analogue of
Lemma \ref{lemma-when-universally-injective-radicial}
is that if $X \to Y$ has property ($\beta$) and is universally
injective, then it is weakly radicial (proof omitted).
\end{remark}

\begin{lemma}
\label{lemma-check-universally-injective}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic
spaces over $S$. Assume
\begin{enumerate}
\item $f$ is locally of finite type,
\item for every \'etale morphism $V \to Y$ the map $|X \times_Y V| \to |V|$
is injective.
\end{enumerate}
Then $f$ is universally injective.
\end{lemma}

\begin{proof}
The question is \'etale local on $Y$ by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-injective-local}.
Hence we may assume that $Y$ is a scheme.
Then $Y$ is in particular decent and by Decent Spaces, Lemma
\ref{decent-spaces-lemma-conditions-on-point-in-fibre-and-qf}
we see that $f$ is locally quasi-finite.
Let $y \in Y$ be a point and let $X_y$ be the scheme theoretic
fibre. Assume $X_y$ is not empty. By Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-locally-quasi-finite-over-field}
we see that $X_y$ is a scheme which is locally quasi-finite over
$\kappa(y)$. Since $|X_y| \subset |X|$ is the fibre of $|X| \to |Y|$
over $y$ we see that $X_y$ has a unique point $x$. The same is true
for $X_y \times_{\Spec(\kappa(y))} \Spec(k)$ for any
finite separable extension $k/\kappa(y)$
because we can realize $k$ as the residue field at a point
lying over $y$ in an \'etale scheme over $Y$,
see More on Morphisms, Lemma
\ref{more-morphisms-lemma-realize-prescribed-residue-field-extension-etale}.
Thus $X_y$ is geometrically connected, see
Varieties, Lemma \ref{varieties-lemma-characterize-geometrically-disconnected}.
This implies that the finite extension $\kappa(x)/\kappa(y)$
is purely inseparable.

\medskip\noindent
We conclude (in the case that $Y$ is a scheme)
that for every $y \in Y$ either the fibre $X_y$ is empty,
or $(X_y)_{red} = \Spec(\kappa(x))$ with
$\kappa(y) \subset \kappa(x)$ purely inseparable.
Hence $f$ is radicial (some details omitted), whence universally injective by
Lemma \ref{lemma-radicial-implies-universally-injective}.
\end{proof}




\section{Monomorphisms}
\label{section-monomorphisms}

\noindent
This section is the continuation of
Morphisms of Spaces, Section \ref{spaces-morphisms-section-monomorphisms}.
We would like to know whether or not every monomorphism of algebraic
spaces is representable. If you can prove this is true or have a
counterexample, please email
\href{mailto:stacks.project@gmail.com}{stacks.project@gmail.com}.
For the moment this is known in the following cases
\begin{enumerate}
\item for monomorphisms which are locally of finite type
(more generally any separated, locally quasi-finite morphism
is representable by Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-quasi-finite-separated-representable}
and a monomorphism which is locally of finite type is
locally quasi-finite by Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-monomorphism-loc-finite-type-loc-quasi-finite}),
\item if the target is a disjoint union of spectra of zero dimensional
local rings (Decent Spaces, Lemma
\ref{decent-spaces-lemma-monomorphism-toward-disjoint-union-dim-0-rings}), and
\item for flat monomorphisms (see below).
\end{enumerate}

\begin{lemma}[David Rydh]
\label{lemma-flat-case}
A flat monomorphism of algebraic spaces is representable by schemes.
\end{lemma}

\begin{proof}
Let $f : X \to Y$ be a flat monomorphism of algebraic spaces.
To prove $f$ is representable, we have to show
$X \times_Y V$ is a scheme for every scheme $V$ mapping to $Y$.
Since being a scheme is local (Properties of Spaces, 
Lemma \ref{spaces-properties-lemma-subscheme}), we may
assume $V$ is affine. Thus we may assume $Y = \Spec(B)$
is an affine scheme. Next, we can assume that $X$ is quasi-compact
by replacing $X$ by a quasi-compact open. The space $X$ is
separated as $X \to X \times_{\Spec(B)} X$ is an isomorphism.
Applying Limits of Spaces, Lemma \ref{spaces-limits-lemma-enough-local}
we reduce to the case where $B$ is local, $X \to \Spec(B)$ is a
flat monomorphism, and
there exists a point $x \in X$ mapping to the closed point of $\Spec(B)$.
Then $X \to \Spec(B)$ is surjective as generalizations
lift along flat morphisms of separated algebraic spaces, see
Decent Spaces, Lemma \ref{decent-spaces-lemma-generalizations-lift-flat}.
Hence we see that $\{X \to \Spec(B)\}$ is an fpqc cover.
Then $X \to \Spec(B)$ is a morphism which becomes an isomorphism
after base change by $X \to \Spec(B)$. Hence it is an isomorphism by
fpqc descent, see Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-isomorphism}.
\end{proof}

\noindent
The following is (in some sense) a variant of the lemma above.

\begin{lemma}
\label{lemma-ui-case}
Let $S$ be a scheme. Let $f : X \to Y$ be a quasi-compact monomorphism
of algebraic spaces such that for every $T \to Y$ the map
$$
\mathcal{O}_T \to f_{T,*}\mathcal{O}_{X \times_Y T}
$$
is injective. Then $f$ is an isomorphism (and hence representable by schemes).
\end{lemma}

\begin{proof}
The question is \'etale local on $Y$, hence we may assume $Y = \Spec(A)$
is affine. Then $X$ is quasi-compact and we may choose an affine scheme
$U = \Spec(B)$ and a surjective \'etale morphism $U \to X$
(Properties of Spaces, Lemma
\ref{spaces-properties-lemma-quasi-compact-affine-cover}).
Note that $U \times_X U = \Spec(B \otimes_A B)$. Hence the category of
quasi-coherent $\mathcal{O}_X$-modules is equivalent to the
category $DD_{B/A}$ of descent data on modules for $A \to B$.
See Properties of Spaces, Proposition
\ref{spaces-properties-proposition-quasi-coherent},
Descent, Definition \ref{descent-definition-descent-datum-modules}, and
Descent, Subsection \ref{descent-subsection-descent-modules-morphisms}.
On the other hand,
$$
A \to B
$$
is a universally injective ring map. Namely, given an
$A$-module $M$ we see that $A \oplus M \to B \otimes_A (A \oplus M)$
is injective by the assumption of the lemma. Hence
$DD_{B/A}$ is equivalent to the category of $A$-modules by
Descent, Theorem \ref{descent-theorem-descent}. Thus pullback along
$f : X \to \Spec(A)$ determines an equivalence of categories of
quasi-coherent modules. In particular $f^*$ is exact on
quasi-coherent modules and we see that $f$ is flat
(small detail omitted). Moreover, it is clear that $f$ is surjective
(for example because $\Spec(B) \to \Spec(A)$ is surjective).
Hence we see that $\{X \to \Spec(A)\}$ is an fpqc cover.
Then $X \to \Spec(A)$ is a morphism which becomes an isomorphism
after base change by $X \to \Spec(A)$. Hence it is an isomorphism by
fpqc descent, see Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-isomorphism}.
\end{proof}

\begin{lemma}
\label{lemma-flat-surjective-monomorphism}
A quasi-compact flat surjective monomorphism of algebraic spaces
is an isomorphism.
\end{lemma}

\begin{proof}
Such a morphism satisfies the assumptions of Lemma \ref{lemma-ui-case}.
\end{proof}







\section{Conormal sheaf of an immersion}
\label{section-conormal-sheaf}

\noindent
Let $S$ be a scheme. Let $i : Z \to X$ be a closed immersion of algebraic
spaces over $S$. Let $\mathcal{I} \subset \mathcal{O}_X$ be the corresponding
quasi-coherent sheaf of ideals, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-closed-immersion-ideals}.
Consider the short exact sequence
$$
0 \to \mathcal{I}^2 \to \mathcal{I} \to \mathcal{I}/\mathcal{I}^2 \to 0
$$
of quasi-coherent sheaves on $X$. Since the sheaf $\mathcal{I}/\mathcal{I}^2$
is annihilated by $\mathcal{I}$ it corresponds to a sheaf on $Z$ by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-i-star-equivalence}.
This quasi-coherent $\mathcal{O}_Z$-module is the
{\it conormal sheaf of $Z$ in $X$} and is often denoted
$\mathcal{I}/\mathcal{I}^2$ by the abuse of notation mentioned in
Morphisms of Spaces,
Section \ref{spaces-morphisms-section-closed-immersions-quasi-coherent}.

\medskip\noindent
In case $i : Z \to X$ is a (locally closed) immersion we define the
conormal sheaf of $i$ as the conormal sheaf of the closed
immersion $i : Z \to X \setminus \partial Z$, see
Morphisms of Spaces, Remark \ref{spaces-morphisms-remark-immersion}.
It is often denoted
$\mathcal{I}/\mathcal{I}^2$ where $\mathcal{I}$ is the ideal sheaf
of the closed immersion $i : Z \to X \setminus \partial Z$.

\begin{definition}
\label{definition-conormal-sheaf}
Let $i : Z \to X$ be an immersion. The {\it conormal sheaf
$\mathcal{C}_{Z/X}$ of $Z$ in $X$} or the {\it conormal sheaf of $i$}
is the quasi-coherent $\mathcal{O}_Z$-module $\mathcal{I}/\mathcal{I}^2$
described above.
\end{definition}

\noindent
In \cite[IV Definition 16.1.2]{EGA} this sheaf is denoted
$\mathcal{N}_{Z/X}$. We will not follow this convention since we would
like to reserve the notation $\mathcal{N}_{Z/X}$
for the {\it normal sheaf of the immersion}. It is defined as
$$
\mathcal{N}_{Z/X} =
\SheafHom_{\mathcal{O}_Z}(\mathcal{C}_{Z/X}, \mathcal{O}_Z) =
\SheafHom_{\mathcal{O}_Z}(\mathcal{I}/\mathcal{I}^2, \mathcal{O}_Z)
$$
provided the conormal sheaf is of finite presentation (otherwise the
normal sheaf may not even be quasi-coherent). We will come back to the
normal sheaf later (insert future reference here).

\begin{lemma}
\label{lemma-etale-conormal}
Let $S$ be a scheme. Let $i : Z \to X$ be an immersion.
Let $\varphi : U \to X$ be an \'etale morphism where $U$ is a scheme.
Set $Z_U = U \times_X Z$ which is a locally closed subscheme of $U$.
Then
$$
\mathcal{C}_{Z/X}|_{Z_U} = \mathcal{C}_{Z_U/U}
$$
canonically and functorially in $U$.
\end{lemma}

\begin{proof}
Let $T \subset X$ be a closed subspace such that $i$ defines a closed
immersion into $X \setminus T$.
Let $\mathcal{I}$ be the quasi-coherent sheaf of ideals on
$X \setminus T$ defining $Z$. Then the lemma just states that
$\mathcal{I}|_{U \setminus \varphi^{-1}(T)}$ is the sheaf of ideals of
the immersion $Z_U \to U \setminus \varphi^{-1}(T)$.
This is clear from the construction of $\mathcal{I}$ in
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-closed-immersion-ideals}.
\end{proof}

\begin{lemma}
\label{lemma-conormal-functorial}
Let $S$ be a scheme. Let
$$
\xymatrix{
Z \ar[r]_i \ar[d]_f & X \ar[d]^g \\
Z' \ar[r]^{i'} & X'
}
$$
be a commutative diagram of algebraic spaces over $S$.
Assume $i$, $i'$ immersions. There is a canonical map
of $\mathcal{O}_Z$-modules
$$
f^*\mathcal{C}_{Z'/X'}
\longrightarrow
\mathcal{C}_{Z/X}
$$
\end{lemma}

\begin{proof}
First find open subspaces $U' \subset X'$ and $U \subset X$ such that
$g(U) \subset U'$ and such that $i(Z) \subset U$ and $i(Z') \subset U'$
are closed (proof existence omitted). Replacing $X$ by $U$ and $X'$ by
$U'$ we may assume that $i$ and $i'$ are closed immersions.
Let $\mathcal{I}' \subset \mathcal{O}_{X'}$ and
$\mathcal{I} \subset \mathcal{O}_X$ be the quasi-coherent sheaves of
ideals associated to $i'$ and $i$, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-closed-immersion-ideals}.
Consider the composition
$$
g^{-1}\mathcal{I}' \to g^{-1}\mathcal{O}_{X'}
\xrightarrow{g^\sharp} \mathcal{O}_X \to
\mathcal{O}_X/\mathcal{I} = i_*\mathcal{O}_Z
$$
Since $g(i(Z)) \subset Z'$ we conclude this composition is zero (see
statement on factorizations in
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-closed-immersion-ideals}).
Thus we obtain a commutative diagram
$$
\xymatrix{
0 \ar[r] &
\mathcal{I} \ar[r] &
\mathcal{O}_X \ar[r] &
i_*\mathcal{O}_Z \ar[r] &
0 \\
0 \ar[r] &
g^{-1}\mathcal{I}' \ar[r] \ar[u] &
g^{-1}\mathcal{O}_{X'} \ar[r] \ar[u] &
g^{-1}i'_*\mathcal{O}_{Z'} \ar[r] \ar[u] &
0
}
$$
The lower row is exact since $g^{-1}$ is an exact functor.
By exactness we also see that
$(g^{-1}\mathcal{I}')^2 = g^{-1}((\mathcal{I}')^2)$.
Hence the diagram induces a map
$g^{-1}(\mathcal{I}'/(\mathcal{I}')^2) \to \mathcal{I}/\mathcal{I}^2$.
Pulling back (using $i^{-1}$ for example) to $Z$ we obtain
$i^{-1}g^{-1}(\mathcal{I}'/(\mathcal{I}')^2) \to \mathcal{C}_{Z/X}$.
Since $i^{-1}g^{-1} = f^{-1}(i')^{-1}$ this gives a map
$f^{-1}\mathcal{C}_{Z'/X'} \to \mathcal{C}_{Z/X}$, which induces
the desired map.
\end{proof}

\begin{lemma}
\label{lemma-conormal-functorial-more}
Let $S$ be a scheme. The conormal sheaf of
Definition \ref{definition-conormal-sheaf}, and its functoriality of
Lemma \ref{lemma-conormal-functorial}
satisfy the following properties:
\begin{enumerate}
\item If $Z \to X$ is an immersion of schemes over $S$, then the conormal
sheaf agrees with the one from
Morphisms, Definition \ref{morphisms-definition-conormal-sheaf}.
\item If in
Lemma \ref{lemma-conormal-functorial}
all the spaces are schemes, then the map
$f^*\mathcal{C}_{Z'/X'} \to \mathcal{C}_{Z/X}$ is the same
as the one constructed in
Morphisms, Lemma \ref{morphisms-lemma-conormal-functorial}.
\item Given a commutative diagram
$$
\xymatrix{
Z \ar[r]_i \ar[d]_f & X \ar[d]^g \\
Z' \ar[r]^{i'} \ar[d]_{f'} & X' \ar[d]^{g'} \\
Z'' \ar[r]^{i''} & X''
}
$$
then the map $(f' \circ f)^*\mathcal{C}_{Z''/X''} \to \mathcal{C}_{Z/X}$
is the same as the composition of
$f^*\mathcal{C}_{Z'/X'} \to \mathcal{C}_{Z/X}$
with the pullback by $f$ of
$(f')^*\mathcal{C}_{Z''/X''} \to \mathcal{C}_{Z'/X'}$
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Note that Part (1) is a special case of
Lemma \ref{lemma-etale-conormal}.
\end{proof}

\begin{lemma}
\label{lemma-conormal-functorial-flat}
Let $S$ be a scheme. Let
$$
\xymatrix{
Z \ar[r]_i \ar[d]_f & X \ar[d]^g \\
Z' \ar[r]^{i'} & X'
}
$$
be a fibre product diagram of algebraic spaces over $S$. Assume
$i$, $i'$ immersions. Then the canonical map
$f^*\mathcal{C}_{Z'/X'} \to \mathcal{C}_{Z/X}$ of
Lemma \ref{lemma-conormal-functorial}
is surjective. If $g$ is flat, then it is an isomorphism.
\end{lemma}

\begin{proof}
Choose a commutative diagram
$$
\xymatrix{
U \ar[r] \ar[d] & X \ar[d] \\
U' \ar[r] & X'
}
$$
where $U$, $U'$ are schemes and the horizontal arrows are surjective
and \'etale, see
Spaces, Lemma \ref{spaces-lemma-lift-morphism-presentations}.
Then using
Lemmas \ref{lemma-etale-conormal} and \ref{lemma-conormal-functorial-more}
we see that the question reduces to the case of a morphism of schemes.
In the schemes case this is
Morphisms, Lemma \ref{morphisms-lemma-conormal-functorial-flat}.
\end{proof}

\begin{lemma}
\label{lemma-transitivity-conormal}
Let $S$ be a scheme.
Let $Z \to Y \to X$ be immersions of algebraic spaces.
Then there is a canonical exact sequence
$$
i^*\mathcal{C}_{Y/X} \to
\mathcal{C}_{Z/X} \to
\mathcal{C}_{Z/Y} \to 0
$$
where the maps come from
Lemma \ref{lemma-conormal-functorial}
and $i : Z \to Y$ is the first morphism.
\end{lemma}

\begin{proof}
Let $U$ be a scheme and let $U \to X$ be a surjective \'etale morphism. Via
Lemmas \ref{lemma-etale-conormal} and \ref{lemma-conormal-functorial-more}
the exactness of the sequence translates immediately into the
exactness of the corresponding sequence for the immersions of schemes
$Z \times_X U \to Y \times_X U \to U$. Hence the lemma follows from
Morphisms, Lemma \ref{morphisms-lemma-transitivity-conormal}.
\end{proof}








\section{The normal cone of an immersion}
\label{section-normal-cone}

\noindent
Let $S$ be a scheme. Let $i : Z \to X$ be a closed immersion of algebraic
spaces over $S$. Let $\mathcal{I} \subset \mathcal{O}_X$ be the
corresponding quasi-coherent sheaf of ideals, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-closed-immersion-ideals}.
Consider the quasi-coherent sheaf of graded $\mathcal{O}_X$-algebras
$\bigoplus_{n \geq 0} \mathcal{I}^n/\mathcal{I}^{n + 1}$.
Since the sheaves $\mathcal{I}^n/\mathcal{I}^{n + 1}$
are each annihilated by $\mathcal{I}$ this graded algebra
corresponds to a quasi-coherent sheaf of graded $\mathcal{O}_Z$-algebras by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-i-star-equivalence}.
This quasi-coherent graded $\mathcal{O}_Z$-algebra is called the
{\it conormal algebra of $Z$ in $X$} and is often simply denoted
$\bigoplus_{n \geq 0} \mathcal{I}^n/\mathcal{I}^{n + 1}$
by the abuse of notation mentioned in
Morphisms of Spaces, Section
\ref{spaces-morphisms-section-closed-immersions-quasi-coherent}.

\medskip\noindent
In case $i : Z \to X$ is a (locally closed) immersion we define the conormal
algebra of $i$ as the conormal algebra of the closed immersion
$i : Z \to X \setminus \partial Z$, see Morphisms of Spaces, Remark
\ref{spaces-morphisms-remark-immersion}.
It is often denoted
$\bigoplus_{n \geq 0} \mathcal{I}^n/\mathcal{I}^{n + 1}$
where $\mathcal{I}$ is the ideal sheaf
of the closed immersion $i : Z \to X \setminus \partial Z$.

\begin{definition}
\label{definition-conormal-algebra}
Let $i : Z \to X$ be an immersion. The {\it conormal algebra
$\mathcal{C}_{Z/X, *}$ of $Z$ in $X$} or the {\it conormal algebra of $i$}
is the quasi-coherent sheaf of graded $\mathcal{O}_Z$-algebras
$\bigoplus_{n \geq 0} \mathcal{I}^n/\mathcal{I}^{n + 1}$ described above.
\end{definition}

\noindent
Thus $\mathcal{C}_{Z/X, 1} = \mathcal{C}_{Z/X}$ is the conormal sheaf
of the immersion. Also $\mathcal{C}_{Z/X, 0} = \mathcal{O}_Z$ and
$\mathcal{C}_{Z/X, n}$ is a quasi-coherent $\mathcal{O}_Z$-module
characterized by the property
\begin{equation}
\label{equation-conormal-in-degree-n}
i_*\mathcal{C}_{Z/X, n} = \mathcal{I}^n/\mathcal{I}^{n + 1}
\end{equation}
where $i : Z \to X \setminus \partial Z$ and $\mathcal{I}$ is the ideal
sheaf of $i$ as above. Finally, note that there is a canonical surjective map
\begin{equation}
\label{equation-conormal-algebra-quotient}
\text{Sym}^*(\mathcal{C}_{Z/X}) \longrightarrow \mathcal{C}_{Z/X, *}
\end{equation}
of quasi-coherent graded $\mathcal{O}_Z$-algebras which is an isomorphism
in degrees $0$ and $1$.

\begin{lemma}
\label{lemma-etale-conormal-algebra}
Let $S$ be a scheme. Let $i : Z \to X$ be an immersion of algebraic spaces
over $S$. Let $\varphi : U \to X$ be an \'etale morphism where $U$ is a
scheme. Set $Z_U = U \times_X Z$ which is a locally closed subscheme of $U$.
Then
$$
\mathcal{C}_{Z/X, *}|_{Z_U} = \mathcal{C}_{Z_U/U, *}
$$
canonically and functorially in $U$.
\end{lemma}

\begin{proof}
Let $T \subset X$ be a closed subspace such that $i$ defines a closed
immersion into $X \setminus T$. Let $\mathcal{I}$ be the quasi-coherent
sheaf of ideals on $X \setminus T$ defining $Z$. Then the lemma follows
from the fact that
$\mathcal{I}|_{U \setminus \varphi^{-1}(T)}$ is the sheaf of ideals of
the immersion $Z_U \to U \setminus \varphi^{-1}(T)$.
This is clear from the construction of $\mathcal{I}$ in
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-closed-immersion-ideals}.
\end{proof}

\begin{lemma}
\label{lemma-conormal-algebra-functorial}
Let $S$ be a scheme. Let
$$
\xymatrix{
Z \ar[r]_i \ar[d]_f & X \ar[d]^g \\
Z' \ar[r]^{i'} & X'
}
$$
be a commutative diagram of algebraic spaces over $S$.
Assume $i$, $i'$ immersions. There is a canonical map
of graded $\mathcal{O}_Z$-algebras
$$
f^*\mathcal{C}_{Z'/X', *}
\longrightarrow
\mathcal{C}_{Z/X, *}
$$
\end{lemma}

\begin{proof}
First find open subspaces $U' \subset X'$ and $U \subset X$ such that
$g(U) \subset U'$ and such that $i(Z) \subset U$ and $i(Z') \subset U'$
are closed (proof existence omitted). Replacing $X$ by $U$ and $X'$ by
$U'$ we may assume that $i$ and $i'$ are closed immersions.
Let $\mathcal{I}' \subset \mathcal{O}_{X'}$ and
$\mathcal{I} \subset \mathcal{O}_X$ be the quasi-coherent sheaves of
ideals associated to $i'$ and $i$, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-closed-immersion-ideals}.
Consider the composition
$$
g^{-1}\mathcal{I}' \to g^{-1}\mathcal{O}_{X'}
\xrightarrow{g^\sharp} \mathcal{O}_X \to
\mathcal{O}_X/\mathcal{I} = i_*\mathcal{O}_Z
$$
Since $g(i(Z)) \subset Z'$ we conclude this composition is zero (see
statement on factorizations in
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-closed-immersion-ideals}).
Thus we obtain a commutative diagram
$$
\xymatrix{
0 \ar[r] &
\mathcal{I} \ar[r] &
\mathcal{O}_X \ar[r] &
i_*\mathcal{O}_Z \ar[r] &
0 \\
0 \ar[r] &
g^{-1}\mathcal{I}' \ar[r] \ar[u] &
g^{-1}\mathcal{O}_{X'} \ar[r] \ar[u] &
g^{-1}i'_*\mathcal{O}_{Z'} \ar[r] \ar[u] &
0
}
$$
The lower row is exact since $g^{-1}$ is an exact functor.
By exactness we also see that
$(g^{-1}\mathcal{I}')^n = g^{-1}((\mathcal{I}')^n)$ for all $n \geq 1$.
Hence the diagram induces a map
$g^{-1}((\mathcal{I}')^n/(\mathcal{I}')^{n + 1}) \to
\mathcal{I}^n/\mathcal{I}^{n + 1}$.
Pulling back (using $i^{-1}$ for example) to $Z$ we obtain
$i^{-1}g^{-1}((\mathcal{I}')^n/(\mathcal{I}')^{n + 1}) \to
\mathcal{C}_{Z/X, n}$.
Since $i^{-1}g^{-1} = f^{-1}(i')^{-1}$ this gives maps
$f^{-1}\mathcal{C}_{Z'/X', n} \to \mathcal{C}_{Z/X, n}$, which induce
the desired map.
\end{proof}

\begin{lemma}
\label{lemma-conormal-algebra-functorial-flat}
Let $S$ be a scheme. Let
$$
\xymatrix{
Z \ar[r]_i \ar[d]_f & X \ar[d]^g \\
Z' \ar[r]^{i'} & X'
}
$$
be a cartesian square of algebraic spaces over $S$ with
$i$, $i'$ immersions. Then the canonical map
$f^*\mathcal{C}_{Z'/X', *} \to \mathcal{C}_{Z/X, *}$ of
Lemma \ref{lemma-conormal-algebra-functorial}
is surjective. If $g$ is flat, then it is an isomorphism.
\end{lemma}

\begin{proof}
We may check the statement after \'etale localizing $X'$.
In this case we may assume $X' \to X$ is a morphism of schemes,
hence $Z$ and $Z'$ are schemes and the result follows from
the case of schemes, see
Divisors, Lemma \ref{divisors-lemma-conormal-algebra-functorial-flat}.
\end{proof}

\noindent
We use the same conventions for cones and vector bundles over
algebraic spaces as we do for schemes (where we use
the conventions of EGA), see
Constructions, Sections \ref{constructions-section-cone} and
\ref{constructions-section-vector-bundle}.
In particular, a vector bundle is a very general gadget
(and not locally isomorphic to an affine space bundle).

\begin{definition}
\label{definition-normal-cone}
Let $S$ be a scheme. Let $i : Z \to X$ be an immersion of algebraic spaces
over $S$. The {\it normal cone $C_ZX$} of $Z$ in $X$ is
$$
C_ZX = \underline{\Spec}_Z(\mathcal{C}_{Z/X, *})
$$
see Morphisms of Spaces,
Definition \ref{spaces-morphisms-definition-relative-spec}. The
{\it normal bundle} of $Z$ in $X$ is the vector bundle
$$
N_ZX = \underline{\Spec}_Z(\text{Sym}(\mathcal{C}_{Z/X}))
$$
\end{definition}

\noindent
Thus $C_ZX \to Z$ is a cone over $Z$ and $N_ZX \to Z$ is a vector bundle
over $Z$. Moreover, the canonical surjection
(\ref{equation-conormal-algebra-quotient}) of graded algebras
defines a canonical closed immersion
\begin{equation}
\label{equation-normal-cone-in-normal-bundle}
C_ZX \longrightarrow N_ZX
\end{equation}
of cones over $Z$.










\section{Sheaf of differentials of a morphism}
\label{section-sheaf-differentials}

\noindent
We suggest the reader take a look at the corresponding section
in the chapter on commutative algebra
(Algebra, Section \ref{algebra-section-differentials}),
the corresponding section in the chapter on morphism of schemes
(Morphisms, Section \ref{morphisms-section-sheaf-differentials})
as well as
Modules on Sites, Section \ref{sites-modules-section-differentials}.
We first show that the notion of sheaf of differentials for a
morphism of schemes agrees with the corresponding morphism of
small \'etale (ringed) sites.

\medskip\noindent
To clearly state the following lemma we temporarily go back to
denoting $\mathcal{F}^a$ the sheaf of $\mathcal{O}_{X_\etale}$-modules
associated to a quasi-coherent $\mathcal{O}_X$-module $\mathcal{F}$
on the scheme $X$, see
Descent, Definition \ref{descent-definition-structure-sheaf}.

\begin{lemma}
\label{lemma-match-modules-differentials}
Let $f : X \to Y$ be a morphism of schemes. Let
$f_{small} : X_\etale \to Y_\etale$ be the associated
morphism of small \'etale sites, see
Descent, Remark \ref{descent-remark-change-topologies-ringed}.
Then there is a canonical isomorphism
$$
(\Omega_{X/Y})^a = \Omega_{X_\etale/Y_\etale}
$$
compatible with universal derivations. Here the first module
is the sheaf on $X_\etale$ associated
to the quasi-coherent $\mathcal{O}_X$-module $\Omega_{X/Y}$, see
Morphisms, Definition \ref{morphisms-definition-sheaf-differentials},
and the second module is the one from
Modules on Sites,
Definition \ref{sites-modules-definition-module-differentials}.
\end{lemma}

\begin{proof}
Let $h : U \to X$ be an \'etale morphism. In this case the natural map
$h^*\Omega_{X/Y} \to \Omega_{U/Y}$ is an isomorphism, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-sheaf-differentials-etale-localization}.
This means that there is a natural $\mathcal{O}_{Y_\etale}$-derivation
$$
\text{d}^a : \mathcal{O}_{X_\etale} \longrightarrow (\Omega_{X/Y})^a
$$
since we have just seen that the value of $(\Omega_{X/Y})^a$ on any object
$U$ of $X_\etale$ is canonically identified with
$\Gamma(U, \Omega_{U/Y})$. By the universal property of
$\text{d}_{X/Y} :
\mathcal{O}_{X_\etale}
\to
\Omega_{X_\etale/Y_\etale}$
there is a unique $\mathcal{O}_{X_\etale}$-linear map
$c : \Omega_{X_\etale/Y_\etale} \to (\Omega_{X/Y})^a$
such that
$\text{d}^a = c \circ \text{d}_{X/Y}$.

\medskip\noindent
Conversely, suppose that $\mathcal{F}$ is an
$\mathcal{O}_{X_\etale}$-module
and $D : \mathcal{O}_{X_\etale} \to \mathcal{F}$ is a
$\mathcal{O}_{Y_\etale}$-derivation. Then we can simply restrict
$D$ to the small Zariski site $X_{Zar}$ of $X$. Since sheaves on $X_{Zar}$
agree with sheaves on $X$, see
Descent, Remark \ref{descent-remark-Zariski-site-space},
we see that $D|_{X_{Zar}} : \mathcal{O}_X \to \mathcal{F}|_{X_{Zar}}$
is just a ``usual'' $Y$-derivation. Hence we obtain a map
$\psi : \Omega_{X/Y} \longrightarrow \mathcal{F}|_{X_{Zar}}$
such that $D|_{X_{Zar}} = \psi \circ \text{d}$. In particular, if we
apply this with $\mathcal{F} = \Omega_{X_\etale/Y_\etale}$
we obtain a map
$$
c' :
\Omega_{X/Y}
\longrightarrow
\Omega_{X_\etale/Y_\etale}|_{X_{Zar}}
$$
Consider the morphism of ringed sites
$\text{id}_{small, \etale, Zar} : X_\etale \to X_{Zar}$
discussed in
Descent, Remark \ref{descent-remark-change-topologies-ringed} and
Lemma \ref{descent-lemma-compare-sites}.
Since the restriction functor $\mathcal{F} \mapsto \mathcal{F}|_{X_{Zar}}$
is equal to $\text{id}_{small, \etale, Zar, *}$, since
$\text{id}_{small, \etale, Zar}^*$ is left adjoint to
$\text{id}_{small, \etale, Zar, *}$ and since
$(\Omega_{X/Y})^a = \text{id}_{small, \etale, Zar}^*\Omega_{X/Y}$
we see that $c'$ is adjoint to a map
$$
c'' :
(\Omega_{X/Y})^a
\longrightarrow
\Omega_{X_\etale/Y_\etale}.
$$
We claim that $c''$ and $c'$ are mutually inverse.
This claim finishes the proof of the lemma.
To see this it is enough to show that $c''(\text{d}(f)) = \text{d}_{X/Y}(f)$
and $c(\text{d}_{X/Y}(f)) = \text{d}(f)$ if $f$ is a local section of
$\mathcal{O}_X$ over an open of $X$. We omit the verification.
\end{proof}

\noindent
This clears the way for the following definition. For an alternative, see
Remark \ref{remark-alternative}.

\begin{definition}
\label{definition-sheaf-differentials}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. The {\it sheaf of differentials $\Omega_{X/Y}$ of $X$ over $Y$}
is sheaf of differentials
(Modules on Sites,
Definition \ref{sites-modules-definition-sheaf-differentials})
for the morphism of ringed topoi
$$
(f_{small}, f^\sharp) :
(X_\etale, \mathcal{O}_X)
\to
(Y_\etale, \mathcal{O}_Y)
$$
of
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-morphism-ringed-topoi}.
The {\it universal $Y$-derivation} will be denoted
$\text{d}_{X/Y} : \mathcal{O}_X \to \Omega_{X/Y}$.
\end{definition}

\noindent
By
Lemma \ref{lemma-match-modules-differentials}
this does not conflict with the already existing
notion in case $X$ and $Y$ are representable. From now on, if $X$ and $Y$
are representable, we no longer distinguish between the sheaf of differentials
defined above and the one defined in
Morphisms, Definition \ref{morphisms-definition-sheaf-differentials}.
We want to relate this to the usual modules of differentials for
morphisms of schemes. Here is the key lemma.

\begin{lemma}
\label{lemma-localize-differentials}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Consider any commutative diagram
$$
\xymatrix{
U \ar[d]_a \ar[r]_\psi & V \ar[d]^b \\
X \ar[r]^f & Y
}
$$
where the vertical arrows are \'etale morphisms of algebraic spaces. Then
$$
\Omega_{X/Y}|_{U_\etale} = \Omega_{U/V}
$$
In particular, if $U$, $V$ are schemes, then this is equal to the usual
sheaf of differentials of the morphism of schemes $U \to V$.
\end{lemma}

\begin{proof}
By
Properties of Spaces, Lemma \ref{spaces-properties-lemma-etale-morphism-topoi}
and Equation (\ref{spaces-properties-equation-restrict})
we may think of the restriction of a sheaf on $X_\etale$ to
$U_\etale$ as the pullback by $a_{small}$. Similarly for $b$. By
Modules on Sites, Lemma \ref{sites-modules-lemma-localize-differentials}
we have
$$
\Omega_{X/Y}|_{U_\etale} =
\Omega_{\mathcal{O}_{U_\etale}/
a_{small}^{-1}f_{small}^{-1}\mathcal{O}_{Y_\etale}}
$$
Since $a_{small}^{-1}f_{small}^{-1}\mathcal{O}_{Y_\etale}
= \psi_{small}^{-1}b_{small}^{-1}\mathcal{O}_{Y_\etale}
= \psi_{small}^{-1}\mathcal{O}_{V_\etale}$ we see that the lemma holds.
\end{proof}

\begin{lemma}
\label{lemma-module-differentials-quasi-coherent}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Then $\Omega_{X/Y}$ is a quasi-coherent $\mathcal{O}_X$-module.
\end{lemma}

\begin{proof}
Choose a diagram as in
Lemma \ref{lemma-localize-differentials}
with $a$ and $b$ surjective and $U$ and $V$ schemes.
Then we see that $\Omega_{X/Y}|_U = \Omega_{U/V}$ which is
quasi-coherent (for example by
Morphisms, Lemma \ref{morphisms-lemma-differentials-diagonal}).
Hence we conclude that $\Omega_{X/Y}$ is quasi-coherent by
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-characterize-quasi-coherent}.
\end{proof}

\begin{remark}
\label{remark-alternative}
Now that we know that $\Omega_{X/Y}$ is quasi-coherent we can attempt
to construct it in another manner. For example we can use the result of
Properties of Spaces,
Section \ref{spaces-properties-section-quasi-coherent-presentation}
to construct the sheaf of differentials by glueing.
For example if $Y$ is a scheme and if $U \to X$ is a surjective \'etale morphism
from a scheme towards $X$, then we see that $\Omega_{U/Y}$ is
a quasi-coherent $\mathcal{O}_U$-module, and since $s, t : R \to U$
are \'etale we get an isomorphism
$$
\alpha : s^*\Omega_{U/Y} \to \Omega_{R/Y} \to t^*\Omega_{U/Y}
$$
by using
Morphisms, Lemma \ref{morphisms-lemma-triangle-differentials-smooth}.
You check that this satisfies the cocycle condition and you're done.
If $Y$ is not a scheme, then you define $\Omega_{U/Y}$ as the cokernel
of the map $(U \to Y)^*\Omega_{Y/S} \to \Omega_{U/S}$, and proceed as
before. This two step process is a little bit ugly. Another possibility
is to glue the sheaves $\Omega_{U/V}$ for any diagram as in
Lemma \ref{lemma-localize-differentials}
but this is not very elegant either. Both approaches will work however, and
will give a slightly more elementary construction of the sheaf of
differentials.
\end{remark}

\begin{lemma}
\label{lemma-functoriality-differentials}
Let $S$ be a scheme. Let
$$
\xymatrix{
X' \ar[d] \ar[r]_f & X \ar[d] \\
Y' \ar[r] & Y
}
$$
be a commutative diagram of algebraic spaces. The map
$f^\sharp : \mathcal{O}_X \to f_*\mathcal{O}_{X'}$ composed with the map
$f_*\text{d}_{X'/Y'} : f_*\mathcal{O}_{X'} \to f_*\Omega_{X'/Y'}$ is a
$Y$-derivation. Hence we obtain a canonical map of $\mathcal{O}_X$-modules
$\Omega_{X/Y} \to f_*\Omega_{X'/Y'}$, and by
adjointness of $f_*$ and $f^*$ a
canonical $\mathcal{O}_{X'}$-module homomorphism
$$
c_f : f^*\Omega_{X/Y} \longrightarrow \Omega_{X'/Y'}.
$$
It is uniquely characterized by the property that
$f^*\text{d}_{X/Y}(t)$ maps to $\text{d}_{X'/Y'}(f^* t)$
for any local section $t$ of $\mathcal{O}_X$.
\end{lemma}

\begin{proof}
This is a special case of
Modules on Sites, Lemma
\ref{sites-modules-lemma-functoriality-differentials-ringed-topoi}.
\end{proof}

\begin{lemma}
\label{lemma-check-functoriality-differentials}
Let $S$ be a scheme. Let
$$
\xymatrix{
X'' \ar[d] \ar[r]_g & X' \ar[d] \ar[r]_f & X \ar[d] \\
Y'' \ar[r] & Y' \ar[r] & Y
}
$$
be a commutative diagram of algebraic spaces over $S$. Then we have
$$
c_{f \circ g} = c_g \circ g^* c_f
$$
as maps $(f \circ g)^*\Omega_{X/Y} \to \Omega_{X''/Y''}$.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the characterization of $c_f, c_g, c_{f \circ g}$
in terms of the effect these maps have on local sections.
\end{proof}

\begin{lemma}
\label{lemma-triangle-differentials}
Let $S$ be a scheme.
Let $f : X \to Y$, $g : Y \to B$ be morphisms of algebraic spaces over $S$.
Then there is a canonical exact sequence
$$
f^*\Omega_{Y/B} \to \Omega_{X/B} \to \Omega_{X/Y} \to 0
$$
where the maps come from applications of
Lemma \ref{lemma-functoriality-differentials}.
\end{lemma}

\begin{proof}
Follows from the schemes version, see
Morphisms, Lemma \ref{morphisms-lemma-triangle-differentials},
of this result via \'etale localization, see
Lemma \ref{lemma-localize-differentials}.
\end{proof}

\begin{lemma}
\label{lemma-immersion-differentials}
Let $S$ be a scheme. If $X \to Y$ is an immersion
of algebraic spaces over $S$ then $\Omega_{X/S}$ is zero.
\end{lemma}

\begin{proof}
Follows from the schemes version, see
Morphisms, Lemma \ref{morphisms-lemma-immersion-differentials},
of this result via \'etale localization, see
Lemma \ref{lemma-localize-differentials}.
\end{proof}

\begin{lemma}
\label{lemma-differentials-relative-immersion}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $i : Z \to X$ be an immersion of algebraic spaces over $B$.
There is a canonical exact sequence
$$
\mathcal{C}_{Z/X} \to i^*\Omega_{X/B} \to \Omega_{Z/B} \to 0
$$
where the first arrow is induced by $\text{d}_{X/B}$
and the second arrow comes from
Lemma \ref{lemma-functoriality-differentials}.
\end{lemma}

\begin{proof}
This is the algebraic spaces version of
Morphisms, Lemma \ref{morphisms-lemma-differentials-relative-immersion}
and will be a consequence of that lemma by
\'etale localization, see
Lemmas \ref{lemma-localize-differentials} and
\ref{lemma-etale-conormal}.
However, we should make sure we can define the first arrow globally.
Hence we explain the meaning of ``induced by $\text{d}_{X/B}$'' here.
Namely, we may assume that $i$ is a closed immersion after replacing $X$
by an open subspace. Let $\mathcal{I} \subset \mathcal{O}_X$
be the quasi-coherent sheaf of ideals corresponding to $Z \subset X$.
Then $\text{d}_{X/S} : \mathcal{I} \to \Omega_{X/S}$
maps the subsheaf $\mathcal{I}^2 \subset \mathcal{I}$ to
$\mathcal{I}\Omega_{X/S}$. Hence it induces a map
$\mathcal{I}/\mathcal{I}^2 \to \Omega_{X/S}/\mathcal{I}\Omega_{X/S}$
which is $\mathcal{O}_X/\mathcal{I}$-linear.
By
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-i-star-equivalence}
this corresponds to a map $\mathcal{C}_{Z/X} \to i^*\Omega_{X/S}$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-differentials-relative-immersion-section}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $i : Z \to X$ be an immersion of algebraic spaces over $B$, and
assume $i$ (\'etale locally) has a left inverse. Then the canonical
sequence
$$
0 \to \mathcal{C}_{Z/X} \to i^*\Omega_{X/B} \to \Omega_{Z/B} \to 0
$$
of
Lemma \ref{lemma-differentials-relative-immersion}
is (\'etale locally) split exact.
\end{lemma}

\begin{proof}
Clarification: we claim that if $g : X \to Z$ is a left inverse of $i$
over $B$, then $i^*c_g$ is a right inverse of the map
$i^*\Omega_{X/B} \to \Omega_{Z/B}$.
Having said this, the result follows from the corresponding result for
morphisms of schemes by \'etale localization, see
Lemmas \ref{lemma-localize-differentials} and
\ref{lemma-etale-conormal}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-differentials}
Let $S$ be a scheme.
Let $X \to Y$ be a morphism of algebraic spaces over $S$.
Let $g : Y' \to Y$ be a morphism of algebraic spaces over $S$.
Let $X' = X_{Y'}$ be the base change of $X$.
Denote $g' : X' \to X$ the projection.
Then the map
$$
(g')^*\Omega_{X/Y} \to \Omega_{X'/Y'}
$$
of
Lemma \ref{lemma-functoriality-differentials}
is an isomorphism.
\end{lemma}

\begin{proof}
Follows from the schemes version, see
Morphisms, Lemma \ref{morphisms-lemma-base-change-differentials}
and \'etale localization, see
Lemma \ref{lemma-localize-differentials}.
\end{proof}

\begin{lemma}
\label{lemma-differential-product}
Let $S$ be a scheme.
Let $f : X \to B$ and $g : Y \to B$ be morphisms of algebraic spaces
over $S$ with the same target.
Let $p : X \times_B Y \to X$ and $q : X \times_B Y \to Y$ be the
projection morphisms. The maps from
Lemma \ref{lemma-functoriality-differentials}
$$
p^*\Omega_{X/B} \oplus q^*\Omega_{Y/B}
\longrightarrow
\Omega_{X \times_B Y/B}
$$
give an isomorphism.
\end{lemma}

\begin{proof}
Follows from the schemes version, see
Morphisms, Lemma \ref{morphisms-lemma-differential-product}
and \'etale localization, see
Lemma \ref{lemma-localize-differentials}.
\end{proof}

\begin{lemma}
\label{lemma-finite-type-differentials}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
If $f$ is locally of finite type, then $\Omega_{X/Y}$ is
a finite type $\mathcal{O}_X$-module.
\end{lemma}

\begin{proof}
Follows from the schemes version, see
Morphisms, Lemma \ref{morphisms-lemma-finite-type-differentials}
and \'etale localization, see
Lemma \ref{lemma-localize-differentials}.
\end{proof}

\begin{lemma}
\label{lemma-finite-presentation-differentials}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
If $f$ is locally of finite presentation, then $\Omega_{X/Y}$ is
an $\mathcal{O}_X$-module of finite presentation.
\end{lemma}

\begin{proof}
Follows from the schemes version, see
Morphisms, Lemma \ref{morphisms-lemma-finite-presentation-differentials}
and \'etale localization, see
Lemma \ref{lemma-localize-differentials}.
\end{proof}

\begin{lemma}
\label{lemma-smooth-omega-finite-locally-free}
Let $S$ be a scheme.
Let $f : X \to Y$ be a smooth morphism of algebraic spaces over $S$.
Then the module of differentials $\Omega_{X/Y}$
is finite locally free.
\end{lemma}

\begin{proof}
The statement is \'etale local on $X$ and $Y$ by
Lemma \ref{lemma-localize-differentials}.
Hence this follows from the case of schemes, see
Morphisms, Lemma \ref{morphisms-lemma-smooth-omega-finite-locally-free}.
\end{proof}













\section{Topological invariance of the \'etale site}
\label{section-topological-invariance}

\noindent
We show that the site $X_{spaces, \etale}$ is a ``topological
invariant''. It then follows that $X_\etale$, which
consists of the representable objects in $X_{spaces, \etale}$,
is a topological invariant too, see Lemma \ref{lemma-topological-invariance}.

\begin{theorem}
\label{theorem-topological-invariance}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Assume $f$ is integral, universally injective and surjective.
The functor
$$
V \longmapsto V_X = X \times_Y V
$$
defines an equivalence of categories
$Y_{spaces, \etale} \to X_{spaces, \etale}$.
\end{theorem}

\begin{proof}
The morphism $f$ is representable and a universal homeomorphism, see
Morphisms of Spaces,
Section \ref{spaces-morphisms-section-universal-homeomorphisms}.

\medskip\noindent
We first prove that the functor is faithful.
Suppose that $V', V$ are objects of $Y_{spaces, \etale}$ and
that $a, b : V' \to V$ are distinct morphisms over $Y$.
Since $V', V$ are \'etale over $Y$ the equalizer
$$
E =  V' \times_{(a, b), V \times_Y V, \Delta_{V/Y}} V
$$
of $a, b$ is \'etale over $Y$ also. Hence $E \to V'$ is an \'etale monomorphism
(i.e., an open immersion) which is an isomorphism if and only if it is
surjective. Since $X \to Y$ is a universal homeomorphism we see that this
is the case if and only if $E_X = V'_X$, i.e., if and only if $a_X = b_X$.

\medskip\noindent
Next, we prove that the functor is fully faithful.
Suppose that $V', V$ are objects of $Y_{spaces, \etale}$ and
that $c : V'_X \to V_X$ is a morphism over $X$. We want to construct
a morphism $a : V' \to V$ over $Y$ such that $a_X = c$.
Let $a' : V'' \to V'$ be a surjective \'etale morphism such that $V''$ is
a separated algebraic space. If we can construct a morphism
$a'' : V'' \to V$ such that $a''_X = c \circ a'_X$, then the two compositions
$$
V'' \times_{V'} V'' \xrightarrow{\text{pr}_i} V'' \xrightarrow{a''} V
$$
will be equal by the faithfulness of the functor proved in the first
paragraph. Hence $a''$ will factor through a unique morphism
$a : V' \to V$ as $V'$ is (as a sheaf) the quotient of $V''$ by
the equivalence relation $V'' \times_{V'} V''$. Hence we may assume that
$V'$ is separated. In this case the graph
$$
\Gamma_c \subset (V' \times_Y V)_X
$$
is open and closed (details omitted). Since $X \to Y$ is a universal
homeomorphism, there exists an open and closed subspace
$\Gamma \subset V' \times_Y V$ such that $\Gamma_X = \Gamma_c$.
The projection $\Gamma \to V'$ is an \'etale morphism whose base
change to $X$ is an isomorphism. Hence $\Gamma \to V'$ is \'etale,
universally injective, and surjective, so an isomorphism by
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-etale-universally-injective-open}.
Thus $\Gamma$ is the graph of a morphism $a : V' \to V$ as desired.

\medskip\noindent
Finally, we prove that the functor is essentially surjective.
Suppose that $U$ is an object of $X_{spaces, \etale}$.
We have to find an object $V$ of $Y_{spaces, \etale}$
such that $V_X \cong U$. Let $U' \to U$ be a surjective \'etale morphism
such that $U' \cong V'_X$ and $U' \times_U U' \cong V''_X$
for some objects $V'', V'$ of $Y_{spaces, \etale}$.
Then by fully faithfulness of the functor we obtain morphisms
$s, t : V'' \to V'$ with $t_X = \text{pr}_0$ and $s_X = \text{pr}_1$
as morphisms $U' \times_U U' \to U'$. Using that
$(\text{pr}_0, \text{pr}_1) : U' \times_U U' \to U' \times_S U'$
is an \'etale equivalence relation, and that $U' \to V'$ and
$U' \times_U U' \to V''$ are universally injective and surjective
we deduce that
$(t, s) : V'' \to V' \times_S V'$ is an \'etale equivalence relation.
Then the quotient $V = V'/V''$ (see
Spaces, Theorem \ref{spaces-theorem-presentation})
is an algebraic space $V$ over $Y$. There is a morphism
$V' \to V$ such that $V'' = V' \times_V V'$. Thus we obtain a morphism
$V \to Y$ (see
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-fpqc-universal-effective-epimorphisms}).
On base change to $X$ we see that we have a morphism $U' \to V_X$
and a compatible isomorphism $U' \times_{V_X} U' = U' \times_U U'$, which
implies that $V_X \cong U$ (by the lemma just cited once more).

\medskip\noindent
Pick a scheme $W$ and a surjective \'etale morphism $W \to Y$.
Pick a scheme $U'$ and a surjective \'etale morphism $U' \to U \times_X W_X$.
Note that $U'$ and $U' \times_U U'$ are schemes \'etale over $X$ whose
structure morphism to $X$ factors through the scheme $W_X$.
Hence by
\'Etale Cohomology,
Theorem \ref{etale-cohomology-theorem-topological-invariance}
there exist schemes $V', V''$ \'etale over $W$ whose base change to
$W_X$ is isomorphic to respectively $U'$ and $U' \times_U U'$.
This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-topological-invariance}
With assumption and notation as in
Theorem \ref{theorem-topological-invariance}
the equivalence of categories
$Y_{spaces, \etale} \to X_{spaces, \etale}$
restricts to equivalences of categories
$Y_\etale \to X_\etale$ and $Y_{affine, \etale} \to X_{affine, \etale}$.
\end{lemma}

\begin{proof}
This is just the statement that given an object
$V \in Y_{spaces, \etale}$ we have $V$ is a(n affine) scheme if and
only if $V \times_Y X$ is a(n affine) scheme. Since $V \times_Y X \to V$
is integral, universally injective, and surjective (as a base
change of $X \to Y$) this
follows from Limits of Spaces, Lemma
\ref{spaces-limits-lemma-integral-universally-bijective-scheme} and
Proposition \ref{spaces-limits-proposition-affine}.
\end{proof}

\begin{remark}
\label{remark-topological-invariance-etale-site}
\begin{reference}
Email by Lenny Taelman dated May 1, 2016.
\end{reference}
A universal homeomorphism of algebraic spaces need not be representable, see
Morphisms of Spaces,
Example \ref{spaces-morphisms-example-universal-homeomorphism}.
In fact Theorem \ref{theorem-topological-invariance} does
not hold for universal homeomorphisms. To see this, let $k$ be an
algebraically closed field of characteristic $0$ and let
$$
\mathbf{A}^1 \to X \to \mathbf{A}^1
$$
be as in Morphisms of Spaces,
Example \ref{spaces-morphisms-example-universal-homeomorphism}.
Recall that the first morphism is \'etale and identifies
$t$ with $-t$ for $t \in \mathbf{A}^1_k \setminus \{0\}$
and that the second morphism is our universal homeomorphism.
Since $\mathbf{A}^1_k$ has no
nontrivial connected finite \'etale coverings
(because $k$ is algebraically closed of characteristic zero; details omitted),
it suffices to construct a nontrivial connected finite \'etale covering
$Y \to X$. To do this, let $Y$ be the affine line
with zero doubled
(Schemes, Example \ref{schemes-example-affine-space-zero-doubled}).
Then $Y = Y_1 \cup Y_2$ with $Y_i = \mathbf{A}^1_k$ glued
along $\mathbf{A}^1_k \setminus \{0\}$.
To define the morphism $Y \to X$ we use the morphisms
$$
Y_1 \xrightarrow{1} \mathbf{A}^1_k \to X
\quad\text{and}\quad
Y_2 \xrightarrow{-1} \mathbf{A}^1_k \to X.
$$
These glue over $Y_1 \cap Y_2$ by the construction of $X$ and
hence define a morphism $Y \to X$. In fact, we claim that
$$
\xymatrix{
Y \ar[d] & Y_1 \amalg Y_2 \ar[l] \ar[d] \\
X & \mathbf{A}^1_k \ar[l]
}
$$
is a cartesian square. We omit the details; you can use for example
Groupoids, Lemma \ref{groupoids-lemma-criterion-fibre-product}.
Since $\mathbf{A}^1_k \to X$ is \'etale and
surjective, this proves that $Y \to X$
is finite \'etale of degree $2$ which gives the desired example.

\medskip\noindent
More simply, you can argue as follows. The scheme $Y$ has a free
action of the group $G = \{+1, -1\}$ where $-1$ acts by swapping
$Y_1$ and $Y_2$ and changing the sign of the coordinate. Then
$X = Y/G$ (see Spaces, Definition \ref{spaces-definition-quotient})
and hence $Y \to X$ is finite \'etale. You can also show directly
that there exists a universal homeomorphism $X \to \mathbf{A}^1_k$
by using $t \mapsto t^2$ on affine spaces. In fact, this $X$ is
the same as the $X$ above.
\end{remark}








\section{Thickenings}
\label{section-thickenings}

\noindent
The following terminology may not be completely standard, but it is convenient.

\begin{definition}
\label{definition-thickening}
Thickenings. Let $S$ be a scheme.
\begin{enumerate}
\item We say an algebraic space $X'$ is a {\it thickening} of an algebraic
space $X$ if $X$ is a closed subspace of $X'$ and the associated topological
spaces are equal.
\item We say $X'$ is a {\it first order thickening} of $X$ if
$X$ is a closed subspace of $X'$ and the quasi-coherent sheaf of ideals
$\mathcal{I} \subset \mathcal{O}_{X'}$ defining $X$ has square zero.
\item We say $X'$ is a {\it finite order thickening} of $X$
if $X$ is a closed subspace of $X$ and the quasi-coherent sheaf of ideals
$\mathcal{I} \subset \mathcal{O}_{X'}$ defining $X$ is nilpotent, i.e.,
there exists an integer $n \geq 0$ such that $\mathcal{I}^{n + 1} = 0$.
\item We say $X'$ is an {\it $n$th order thickening} of $X$
if $X$ is a closed subspace of $X$ and $\mathcal{I}^{n + 1} = 0$
where $\mathcal{I} \subset \mathcal{O}_{X'}$ is the
quasi-coherent sheaf of ideals defining $X$.
\item Given two thickenings $X \subset X'$ and $Y \subset Y'$ a
{\it morphism of thickenings} is a morphism $f' : X' \to Y'$ such that
$f(X) \subset Y$, i.e., such that $f'|_X$ factors through the closed
subspace $Y$. In this situation we set $f = f'|_X : X \to Y$ and we say
that $(f, f') : (X \subset X') \to (Y \subset Y')$ is a morphism of
thickenings.
\item Let $B$ be an algebraic space. We similarly define
{\it thickenings over $B$}, and
{\it morphisms of thickenings over $B$}. This means that the spaces
$X, X', Y, Y'$ above are algebraic spaces endowed with a structure
morphism to $B$, and that the morphisms
$X \to X'$, $Y \to Y'$ and $f' : X' \to Y'$ are morphisms over $B$.
\end{enumerate}
\end{definition}

\noindent
The fundamental equivalence.
Note that if $X \subset X'$ is a thickening, then $X \to X'$
is integral and universally bijective. This implies that
\begin{equation}
\label{equation-equivalence-etale-spaces}
X_{spaces, \etale} = X'_{spaces, \etale}
\end{equation}
via the pullback functor, see
Theorem \ref{theorem-topological-invariance}.
Hence we may think of $\mathcal{O}_{X'}$ as a sheaf on
$X_{spaces, \etale}$. Thus a canonical equivalence
of locally ringed topoi
\begin{equation}
\label{equation-fundamental-equivalence}
(\Sh(X'_{spaces, \etale}), \mathcal{O}_{X'})
\cong
(\Sh(X_{spaces, \etale}), \mathcal{O}_{X'})
\end{equation}
Below we will frequently combine this with the fully faithfulness result of
Properties of Spaces, Theorem \ref{spaces-properties-theorem-fully-faithful}.
For example the closed immersion $i_X : X \to X'$ corresponds
to the surjective map $i_X^\sharp : \mathcal{O}_{X'} \to \mathcal{O}_X$.

\medskip\noindent
Let $S$ be a scheme, and let $B$ be an algebraic space over $S$.
Let $(f, f') : (X \subset X') \to (Y \subset Y')$ be a morphism of
thickenings over $B$. Note that the diagram of continuous functors
$$
\xymatrix{
X_{spaces, \etale} &
Y_{spaces, \etale} \ar[l] \\
X'_{spaces, \etale} \ar[u] &
Y'_{spaces, \etale} \ar[u] \ar[l]
}
$$
is commutative and the vertical arrows are equivalences. Hence
$f_{spaces, \etale}$, $f_{small}$,
$f'_{spaces, \etale}$, and $f'_{small}$
all define the same morphism of topoi. Thus we may think of
$$
(f')^\sharp :
f_{spaces, \etale}^{-1}\mathcal{O}_{Y'}
\longrightarrow
\mathcal{O}_{X'}
$$
as a map of sheaves of $\mathcal{O}_B$-algebras fitting into the commutative
diagram
$$
\xymatrix{
f_{spaces, \etale}^{-1}\mathcal{O}_Y \ar[r]_-{f^\sharp} \ar[r] &
\mathcal{O}_X \\
f_{spaces, \etale}^{-1}\mathcal{O}_{Y'} \ar[r]^-{(f')^\sharp}
\ar[u]^{i_Y^\sharp} &
\mathcal{O}_{X'} \ar[u]_{i_X^\sharp}
}
$$
Here $i_X : X \to X'$ and $i_Y : Y \to Y'$ are the names of the given
closed immersions.

\begin{lemma}
\label{lemma-first-order-thickening-maps}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $X \subset X'$ and $Y \subset Y'$ be thickenings
of algebraic spaces over $B$. Let $f : X \to Y$ be a morphism of algebraic
spaces over $B$. Given any map of $\mathcal{O}_B$-algebras
$$
\alpha : f_{spaces, \etale}^{-1}\mathcal{O}_{Y'} \to \mathcal{O}_{X'}
$$
such that
$$
\xymatrix{
f_{spaces, \etale}^{-1}\mathcal{O}_Y \ar[r]_-{f^\sharp} \ar[r] &
\mathcal{O}_X \\
f_{spaces, \etale}^{-1}\mathcal{O}_{Y'} \ar[r]^-\alpha
\ar[u]^{i_Y^\sharp} &
\mathcal{O}_{X'} \ar[u]_{i_X^\sharp}
}
$$
commutes, there exists a unique morphism of $(f, f')$ of
thickenings over $B$ such that $\alpha = (f')^\sharp$.
\end{lemma}

\begin{proof}
To find $f'$, by
Properties of Spaces, Theorem \ref{spaces-properties-theorem-fully-faithful},
all we have to do is show that the morphism of ringed topoi
$$
(f_{spaces, \etale}, \alpha) :
(\Sh(X_{spaces, \etale}), \mathcal{O}_{X'})
\longrightarrow
(\Sh(Y_{spaces, \etale}), \mathcal{O}_{Y'})
$$
is a morphism of locally ringed topoi. This follows directly
from the definition of morphisms of locally ringed topoi
(Modules on Sites,
Definition \ref{sites-modules-definition-morphism-locally-ringed-topoi}),
the fact that $(f, f^\sharp)$ is a morphism of locally ringed topoi
(Properties of Spaces,
Lemma \ref{spaces-properties-lemma-morphism-locally-ringed}),
that $\alpha$ fits into the given commutative diagram, and
the fact that the kernels of $i_X^\sharp$ and $i_Y^\sharp$ are
locally nilpotent. Finally, the fact that $f' \circ i_X = i_Y \circ f$
follows from the commutativity of the diagram and another application of
Properties of Spaces, Theorem \ref{spaces-properties-theorem-fully-faithful}.
We omit the verification that $f'$ is a morphism over $B$.
\end{proof}

\begin{lemma}
\label{lemma-open-subspace-thickening}
Let $S$ be a scheme. Let $X \subset X'$ be a thickening
of algebraic spaces over $S$. For any open subspace $U \subset X$ there
exists a unique open subspace $U' \subset X'$ such that
$U = X \times_{X'} U'$.
\end{lemma}

\begin{proof}
Let $U' \to X'$ be the object of $X'_{spaces, \etale}$
corresponding to the object $U \to X$ of $X_{spaces, \etale}$
via (\ref{equation-equivalence-etale-spaces}). The morphism
$U' \to X'$ is \'etale and universally injective, hence an open immersion, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-etale-universally-injective-open}.
\end{proof}

\noindent
Let $i_X : X \to X'$ be a thickening of algebraic spaces. Any local section
of the kernel $\mathcal{I} = \Ker(i_X^\sharp) \subset \mathcal{O}_{X'}$ is
locally nilpotent. This gives some control over the structure sheaf
of $\mathcal{O}_{X'}$ but technically the class of finite order
thickenings $X \subset X'$ is much easier to handle.
Namely, if $X'$ is an $n$th order thickening we have a filtration
$$
0 \subset \mathcal{I}^n \subset \mathcal{I}^{n - 1} \subset
\ldots \subset \mathcal{I} \subset \mathcal{O}_{X'}
$$
and we see that $X'$ is filtered by closed subspaces
$$
X = X_0 \subset X_1 \subset \ldots \subset X_{n - 1} \subset X_{n + 1} = X'
$$
such that each pair $X_i \subset X_{i + 1}$ is a first order thickening
over $B$. Using simple induction arguments many results proved for first order
thickenings can be rephrased as results on finite order thickenings.

\begin{lemma}
\label{lemma-first-order-thickening-surjective}
Let $S$ be a scheme. Let $X \subset X'$ be a thickening
of algebraic spaces over $S$. Let $U$ be an affine object of
$X_{spaces, \etale}$. Then
$$
\Gamma(U, \mathcal{O}_{X'}) \to \Gamma(U, \mathcal{O}_X)
$$
is surjective where we think of $\mathcal{O}_{X'}$ as a sheaf on
$X_{spaces, \etale}$ via (\ref{equation-fundamental-equivalence}).
\end{lemma}

\begin{proof}
Let $U' \to X'$ be the \'etale morphism of algebraic spaces such that
$U = X \times_{X'} U'$, see Theorem \ref{theorem-topological-invariance}.
By Limits of Spaces, Lemma \ref{spaces-limits-lemma-affine} we see
that $U'$ is an affine scheme. Hence
$\Gamma(U, \mathcal{O}_{X'}) = \Gamma(U', \mathcal{O}_{U'}) \to
\Gamma(U, \mathcal{O}_U)$
is surjective as $U \to U'$ is a closed immersion of affine schemes.
Below we give a direct proof for finite order thickenings
which is the case most used in practice.
\end{proof}

\begin{proof}[Proof for finite order thickenings]
We may assume that $X \subset X'$ is a first order thickening by the
principle explained above. Denote $\mathcal{I}$ the kernel of the surjection
$\mathcal{O}_{X'} \to \mathcal{O}_X$. As $\mathcal{I}$ is a quasi-coherent
$\mathcal{O}_{X'}$-module and since $\mathcal{I}^2 = 0$ by the definition
of a first order thickening we may apply
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-i-star-equivalence}
to see that $\mathcal{I}$ is a quasi-coherent $\mathcal{O}_X$-module.
Hence the lemma follows from the long exact cohomology sequence
associated to the short exact sequence
$$
0 \to \mathcal{I} \to \mathcal{O}_{X'} \to \mathcal{O}_X \to 0
$$
and the fact that $H^1_\etale(U, \mathcal{I}) = 0$ as
$\mathcal{I}$ is quasi-coherent, see
Descent, Proposition \ref{descent-proposition-same-cohomology-quasi-coherent}
and Cohomology of Schemes, Lemma
\ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}.
\end{proof}

\begin{lemma}
\label{lemma-thickening-scheme}
Let $S$ be a scheme. Let $X \subset X'$ be a thickening of algebraic spaces
over $S$. If $X$ is (representable by) a scheme, then so is $X'$.
\end{lemma}

\begin{proof}
Note that $X'_{red} = X_{red}$. Hence if $X$ is a scheme, then
$X'_{red}$ is a scheme. Thus the result follows from
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-reduction-scheme}.
Below we give a direct proof for finite order thickenings which is
the case most often used in practice.
\end{proof}

\begin{proof}[Proof for finite order thickenings]
It suffices to prove this when $X'$ is a first order thickening of $X$. By
Properties of Spaces, Lemma \ref{spaces-properties-lemma-subscheme}
there is a largest open subspace of $X'$ which is a scheme. Thus we have
to show that every point $x$ of $|X'| = |X|$ is contained in an open subspace of
$X'$ which is a scheme. Using
Lemma \ref{lemma-open-subspace-thickening}
we may replace $X \subset X'$ by $U \subset U'$ with $x \in U$ and $U$
an affine scheme. Hence we may assume that $X$ is affine.
Thus we reduce to the case discussed in the next paragraph.

\medskip\noindent
Assume $X \subset X'$ is a first order thickening where $X$ is an affine
scheme. Set $A = \Gamma(X, \mathcal{O}_X)$ and
$A' = \Gamma(X', \mathcal{O}_{X'})$. By
Lemma \ref{lemma-first-order-thickening-surjective}
the map $A' \to A$ is surjective. The kernel $I$ is an ideal of square zero. By
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-morphism-to-affine-scheme}
we obtain a canonical morphism $f : X' \to \Spec(A')$ which fits
into the following commutative diagram
$$
\xymatrix{
X \ar@{=}[d] \ar[r] &  X' \ar[d]^f \\
\Spec(A) \ar[r] & \Spec(A')
}
$$
Because the horizontal arrows are thickenings it is clear that $f$ is
universally injective and surjective. Hence it suffices to show that
$f$ is \'etale, since then
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-etale-universally-injective-open}
will imply that $f$ is an isomorphism.

\medskip\noindent
To prove that $f$ is \'etale choose an affine scheme $U'$ and an
\'etale morphism $U' \to X'$. It suffices to show that
$U' \to X' \to \Spec(A')$ is \'etale, see
Properties of Spaces, Definition \ref{spaces-properties-definition-etale}.
Write $U' = \Spec(B')$. Set $U = X \times_{X'} U'$. Since $U$
is a closed subspace of $U'$, it is a closed subscheme, hence
$U = \Spec(B)$ with $B' \to B$ surjective. Denote
$J = \Ker(B' \to B)$ and note that $J = \Gamma(U, \mathcal{I})$
where $\mathcal{I} = \Ker(\mathcal{O}_{X'} \to \mathcal{O}_X)$
on $X_{spaces, \etale}$ as in the proof of
Lemma \ref{lemma-first-order-thickening-surjective}.
The morphism $U' \to X' \to \Spec(A')$ induces a commutative
diagram
$$
\xymatrix{
0 \ar[r] &
J \ar[r] &
B' \ar[r] &
B \ar[r] & 0 \\
0 \ar[r] &
I \ar[r] \ar[u] &
A' \ar[r] \ar[u] &
A \ar[r] \ar[u] & 0
}
$$
Now, since $\mathcal{I}$ is a quasi-coherent $\mathcal{O}_X$-module
we have $\mathcal{I} = (\widetilde I)^a$, see
Descent, Definition \ref{descent-definition-structure-sheaf}
for notation and
Descent, Proposition \ref{descent-proposition-equivalence-quasi-coherent}
for why this is true. Hence we see that $J = I \otimes_A B$.
Finally, note that $A \to B$ is \'etale as $U \to X$ is \'etale as
the base change of the \'etale morphism $U' \to X'$.
We conclude that $A' \to B'$ is \'etale by
Algebra, Lemma \ref{algebra-lemma-lift-etale-infinitesimal}.
\end{proof}

\begin{lemma}
\label{lemma-thickening-equivalence}
Let $S$ be a scheme. Let $X \subset X'$ be a thickening of algebraic spaces
over $S$. The functor
$$
V' \longmapsto V = X \times_{X'} V'
$$
defines an equivalence of categories
$X'_\etale \to X_\etale$.
\end{lemma}

\begin{proof}
The functor $V' \mapsto V$ defines an equivalence of categories
$X'_{spaces, \etale} \to X_{spaces, \etale}$, see
Theorem \ref{theorem-topological-invariance}.
Thus it suffices to show that $V$ is a scheme if and only if $V'$ is
a scheme. This is the content of
Lemma \ref{lemma-thickening-scheme}.
\end{proof}

\noindent
First order thickening are described as follows.

\begin{lemma}
\label{lemma-first-order-thickening}
Let $S$ be a scheme.
Let $f : X \to B$ be a morphism of algebraic spaces over $S$.
Consider a short exact sequence
$$
0 \to \mathcal{I} \to \mathcal{A} \to \mathcal{O}_X \to 0
$$
of sheaves on $X_\etale$ where $\mathcal{A}$ is a sheaf of
$f^{-1}\mathcal{O}_B$-algebras, $\mathcal{A} \to \mathcal{O}_X$ is a surjection
of sheaves of $f^{-1}\mathcal{O}_B$-algebras, and $\mathcal{I}$ is its kernel.
If
\begin{enumerate}
\item $\mathcal{I}$ is an ideal of square zero in $\mathcal{A}$, and
\item $\mathcal{I}$ is quasi-coherent as an $\mathcal{O}_X$-module
\end{enumerate}
then there exists a first order thickening
$X \subset X'$ over $B$ and an isomorphism
$\mathcal{O}_{X'} \to \mathcal{A}$ of $f^{-1}\mathcal{O}_B$-algebras
compatible with the surjections to $\mathcal{O}_X$.
\end{lemma}

\begin{proof}
In this proof we redo some of the arguments used in the
proofs of
Lemmas \ref{lemma-first-order-thickening-surjective} and
\ref{lemma-thickening-scheme}.
We first handle the case $B = S = \Spec(\mathbf{Z})$.
Let $U$ be an affine scheme, and let $U \to X$ be \'etale.
Then
$$
0 \to \mathcal{I}(U) \to \mathcal{A}(U) \to \mathcal{O}_X(U) \to 0
$$
is exact as $H^1(U_\etale, \mathcal{I}) = 0$ as
$\mathcal{I}$ is quasi-coherent, see
Descent, Proposition \ref{descent-proposition-same-cohomology-quasi-coherent}
and Cohomology of Schemes, Lemma
\ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}.
If $V \to U$ is a morphism of affine objects of $X_{spaces, \etale}$
then
$$
\mathcal{I}(V) = \mathcal{I}(U) \otimes_{\mathcal{O}_X(U)} \mathcal{O}_X(V)
$$
since $\mathcal{I}$ is a quasi-coherent $\mathcal{O}_X$-module, see
Descent, Proposition \ref{descent-proposition-equivalence-quasi-coherent}.
Hence $\mathcal{A}(U) \to \mathcal{A}(V)$ is an
\'etale ring map, see
Algebra, Lemma \ref{algebra-lemma-lift-etale-infinitesimal}.
Hence we see that
$$
U \longmapsto U' = \Spec(\mathcal{A}(U))
$$
is a functor from $X_{affine, \etale}$ to the category of affine
schemes and \'etale morphisms. In fact, we claim that this functor can
be extended to a functor $U \mapsto U'$ on all of $X_\etale$.
To see this, if $U$ is an object of $X_\etale$, note that
$$
0 \to \mathcal{I}|_{U_{Zar}} \to \mathcal{A}|_{U_{Zar}} \to
\mathcal{O}_X|_{U_{Zar}} \to 0
$$
and $\mathcal{I}|_{U_{Zar}}$ is a quasi-coherent sheaf on $U$, see
Descent,
Proposition \ref{descent-proposition-equivalence-quasi-coherent-functorial}.
Hence by
More on Morphisms, Lemma \ref{more-morphisms-lemma-first-order-thickening}
we obtain a first order thickening $U \subset U'$ of schemes such that
$\mathcal{O}_{U'}$ is isomorphic to $\mathcal{A}|_{U_{Zar}}$. It is clear that
this construction is compatible with the construction for affines above.

\medskip\noindent
Choose a presentation $X = U/R$, see
Spaces, Definition \ref{spaces-definition-presentation}
so that $s, t : R \to U$ define an \'etale equivalence relation.
Applying the functor above we obtain an \'etale equivalence
relation $s', t' : R' \to U'$ in schemes. Consider the algebraic space
$X' = U'/R'$ (see
Spaces, Theorem \ref{spaces-theorem-presentation}).
The morphism $X = U/R \to U'/R' = X'$ is a first order thickening.
Consider $\mathcal{O}_{X'}$ viewed as a sheaf on $X_\etale$.
By construction we have an isomorphism
$$
\gamma :
\mathcal{O}_{X'}|_{U_\etale}
\longrightarrow
\mathcal{A}|_{U_\etale}
$$
such that $s^{-1}\gamma$ agrees with $t^{-1}\gamma$ on $R_\etale$.
Hence by
Properties of Spaces, Lemma \ref{spaces-properties-lemma-descent-sheaf}
this implies that $\gamma$ comes from a unique isomorphism
$\mathcal{O}_{X'} \to \mathcal{A}$ as desired.

\medskip\noindent
To handle the case of a general base algebraic space $B$, we first
construct $X'$ as an algebraic space over $\mathbf{Z}$ as above.
Then we use the isomorphism $\mathcal{O}_{X'} \to \mathcal{A}$ to
define $f^{-1}\mathcal{O}_B \to \mathcal{O}_{X'}$. According to
Lemma \ref{lemma-first-order-thickening-maps}
this defines a morphism $X' \to B$ compatible with the given morphism
$X \to B$ and we are done.
\end{proof}

\begin{lemma}
\label{lemma-base-change-thickening}
Let $S$ be a scheme. Let $Y \subset Y'$ be a thickening of algebraic spaces
over $S$. Let $X' \to Y'$ be a morphism and set $X = Y \times_{Y'} X'$.
Then $(X \subset X') \to (Y \subset Y')$
is a morphism of thickenings. If $Y \subset Y'$ is a first
(resp.\ finite order) thickening, then $X \subset X'$ is a first
(resp.\ finite order) thickening.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-composition-thickening}
Let $S$ be a scheme. If $X \subset X'$ and $X' \subset X''$ are
thickenings of algebraic spaces over $S$, then so is $X \subset X''$.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-descending-property-thickening}
The property of being a thickening is fpqc local.
Similarly for first order thickenings.
\end{lemma}

\begin{proof}
The statement means the following: Let $S$ be a scheme and let
$X \to X'$ be a morphism of algebraic spaces over $S$.
Let $\{g_i : X'_i \to X'\}$ be an fpqc covering of algebraic spaces
such that the base change $X_i \to X'_i$ is a thickening for all $i$.
Then $X \to X'$ is a thickening. Since the morphisms $g_i$ are jointly
surjective we conclude that $X \to X'$ is surjective. By
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-closed-immersion}
we conclude that $X \to X'$ is a closed immersion.
Thus $X \to X'$ is a thickening. We omit the proof in the
case of first order thickenings.
\end{proof}








\section{Morphisms of thickenings}
\label{section-morphisms-thickenings}

\noindent
If $(f, f') : (X \subset X') \to (Y \subset Y')$ is a morphism
of thickenings of algebraic spaces, then often properties of the morphism
$f$ are inherited by $f'$. There are several variants.

\begin{lemma}
\label{lemma-thicken-property-morphisms}
Let $S$ be a scheme. Let $(f, f') : (X \subset X') \to (Y \subset Y')$
be a morphism of thickenings of algebraic spaces over $S$. Then
\begin{enumerate}
\item $f$ is an affine morphism if and only if $f'$ is an affine morphism,
\item $f$ is a surjective morphism if and only if $f'$ is a surjective morphism,
\item $f$ is quasi-compact if and only if $f'$ quasi-compact,
\item $f$ is universally closed if and only if $f'$ is universally closed,
\item $f$ is integral if and only if $f'$ is integral,
\item $f$ is (quasi-)separated if and only if $f'$ is (quasi-)separated,
\item $f$ is universally injective if and only if $f'$ is universally injective,
\item $f$ is universally open if and only if $f'$ is universally open,
\item $f$ is representable if and only if $f'$ is representable, and
\item add more here.
\end{enumerate}
\end{lemma}

\begin{proof}
Observe that $Y \to Y'$ and $X \to X'$ are integral and
universal homeomorphisms. This immediately implies parts
(2), (3), (4), (7), and (8).
Part (1) follows from
Limits of Spaces, Proposition \ref{spaces-limits-proposition-affine}
which tells us that there is a 1-to-1 correspondence between
affine schemes \'etale over $X$ and $X'$ and between affine schemes
\'etale over $Y$ and $Y'$.
Part (5) follows from (1) and (4) by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-integral-universally-closed}.
Finally, note that
$$
X \times_Y X = X \times_{Y'} X \to X \times_{Y'} X' \to X' \times_{Y'} X'
$$
is a thickening (the two arrows are thickenings by
Lemma \ref{lemma-base-change-thickening}).
Hence applying (3) and (4) to the morphism
$(X \subset X') \to (X \times_Y X \to X' \times_{Y'} X')$
we obtain (6). Finally, part (9) follows from the fact that an
algebraic space thickening of a scheme is again a scheme, see
Lemma \ref{lemma-thickening-scheme}.
\end{proof}

\begin{lemma}
\label{lemma-thicken-property-morphisms-cartesian}
Let $S$ be a scheme. Let $(f, f') : (X \subset X') \to (Y \subset Y')$ be a
morphism of thickenings of algebraic spaces over $S$ such that
$X = Y \times_{Y'} X'$. If $X \subset X'$ is a finite order thickening, then
\begin{enumerate}
\item $f$ is a closed immersion if and only if $f'$ is a closed immersion,
\item $f$ is locally of finite type if and only if $f'$ is
locally of finite type,
\item $f$ is locally quasi-finite if and only if $f'$ is locally
quasi-finite,
\item $f$ is locally of finite type of relative dimension $d$ if and
only if $f'$ is locally of finite type of relative dimension $d$,
\item $\Omega_{X/Y} = 0$ if and only if $\Omega_{X'/Y'} = 0$,
\item $f$ is unramified if and only if $f'$ is unramified,
\item $f$ is proper if and only if $f'$ is proper,
\item $f$ is a finite morphism if and only if $f'$ is an finite morphism,
\item $f$ is a monomorphism if and only if $f'$ is a monomorphism,
\item $f$ is an immersion if and only if $f'$ is an immersion, and
\item add more here.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a scheme $V'$ and a surjective \'etale morphism $V' \to Y'$.
Choose a scheme $U'$ and a surjective \'etale morphism
$U' \to X' \times_{Y'} V'$. Set $V = Y \times_{Y'} V'$ and
$U = X \times_{X'} U'$. Then for \'etale local properties of morphisms
we can reduce to the morphism of thickenings of schemes
$(U \subset U') \to (V \subset V')$ and apply More on Morphisms, Lemma
\ref{more-morphisms-lemma-thicken-property-morphisms-cartesian}.
This proves (2), (3), (4), (5), and (6).

\medskip\noindent
The properties of morphisms in (1), (7), (8), (9), (10) are stable
under base change, hence if $f'$ has property $\mathcal{P}$, then so
does $f$. See
Spaces, Lemma \ref{spaces-lemma-base-change-immersions},
and
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-base-change-proper},
\ref{spaces-morphisms-lemma-base-change-integral}, and
\ref{spaces-morphisms-lemma-base-change-monomorphism}.

\medskip\noindent
The interesting direction in (1), (7), (8), (9), (10) is to assume
that $f$ has the property and deduce that $f'$ has it too.
By induction on the order of the thickening we may
assume that $Y \subset Y'$ is a first order thickening, see
discussion on finite order thickenings above.

\medskip\noindent
Proof of (1). Choose a scheme $V'$ and a surjective \'etale morphism
$V' \to Y'$. Set $V = Y \times_{Y'} V'$, $U' = X' \times_{Y'} V'$
and $U = X \times_Y V$. Then $U \to V$ is a closed immersion, which
implies that $U$ is a scheme, which in turn implies that $U'$ is
a scheme (Lemma \ref{lemma-thickening-scheme}). Thus we can apply
the lemma in the case of schemes
(More on Morphisms, Lemma
\ref{more-morphisms-lemma-thicken-property-morphisms-cartesian})
to $(U \subset U') \to (V \subset V')$ to conclude.

\medskip\noindent
Proof of (7). Follows by combining (2) with
results of Lemma \ref{lemma-thicken-property-morphisms}
and the fact that proper equals quasi-compact $+$
separated $+$ locally of finite type $+$ universally closed.

\medskip\noindent
Proof of (8). Follows by combining (2) with
results of Lemma \ref{lemma-thicken-property-morphisms}
and using the fact that finite equals integral $+$ locally
of finite type (Morphisms, Lemma \ref{morphisms-lemma-finite-integral}).

\medskip\noindent
Proof of (9). As $f$ is a monomorphism we have $X = X \times_Y X$.
We may apply the results proved so far to the morphism
of thickenings $(X \subset X') \to (X \times_Y X \subset X' \times_{Y'} X')$.
We conclude $X' \to X' \times_{Y'} X'$ is a closed immersion by (1).
In fact, it is a first order thickening as the ideal defining the
closed immersion $X' \to X' \times_{Y'} X'$ is contained in the pullback
of the ideal $\mathcal{I} \subset \mathcal{O}_{Y'}$ cutting out $Y$ in $Y'$.
Indeed, $X = X \times_Y X = (X' \times_{Y'} X') \times_{Y'} Y$ is contained
in $X'$. The conormal sheaf of the closed immersion
$\Delta : X' \to X' \times_{Y'} X'$ is equal to $\Omega_{X'/Y'}$
(this is the analogue of
Morphisms, Lemma \ref{morphisms-lemma-differentials-diagonal}
for algebraic spaces and follows either by \'etale localization
or by combining
Lemmas \ref{lemma-differentials-relative-immersion-section} and
\ref{lemma-differential-product}; some details omitted).
Thus it suffices to show that $\Omega_{X'/Y'} = 0$ which follows from (5)
and the corresponding statement for $X/Y$.

\medskip\noindent
Proof of (10). If $f : X \to Y$ is an immersion, then it factors as
$X \to V \to Y$ where $V \to Y$ is an open subspace and $X \to V$ is a
closed immersion, see
Morphisms of Spaces, Remark \ref{spaces-morphisms-remark-immersion}.
Let $V' \subset Y'$ be the open subspace whose
underlying topological space $|V'|$ is the same as $|V| \subset |Y| = |Y'|$.
Then $X' \to Y'$ factors through $V'$ and we conclude that $X' \to V'$
is a closed immersion by part (1). This finishes the proof.
\end{proof}

\noindent
The following lemma is a variant on the preceding one. Rather than assume
that the thickenings involved are finite order (which allows us to transfer
the property of being locally of finite type from $f$ to $f'$),
we instead take as given that each of $f$ and $f'$ is locally of
finite type.

\begin{lemma}
\label{lemma-properties-that-extend-over-thickenings}
Let $S$ be a scheme. Let $(f, f') : (X \subset X') \to (Y \to Y')$ be a
morphism of thickenings of algebraic spaces over $S$. Assume $f$ and $f'$
are locally of finite type and $X = Y \times_{Y'} X'$. Then
\begin{enumerate}
\item $f$ is locally quasi-finite if and only if $f'$ is locally quasi-finite,
\item $f$ is finite if and only if $f'$ is finite,
\item $f$ is a closed immersion if and only if $f'$ is a closed immersion,
\item $\Omega_{X/Y} = 0$ if and only if $\Omega_{X'/Y'} = 0$,
\item $f$ is unramified if and only if $f'$ is unramified,
\item $f$ is a monomorphism if and only if $f'$ is a monomorphism,
\item $f$ is an immersion if and only if $f'$ is an immersion,
\item $f$ is proper if and only if $f'$ is proper, and
\item add more here.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a scheme $V'$ and a surjective \'etale morphism $V' \to Y'$.
Choose a scheme $U'$ and a surjective \'etale morphism
$U' \to X' \times_{Y'} V'$. Set $V = Y \times_{Y'} V'$ and
$U = X \times_{X'} U'$. Then for \'etale local properties of morphisms
we can reduce to the morphism of thickenings of schemes
$(U \subset U') \to (V \subset V')$ and apply
More on Morphisms, Lemma
\ref{more-morphisms-lemma-properties-that-extend-over-thickenings}.
This proves (1), (4), and (5).

\medskip\noindent
The properties in (2), (3), (6), (7), and (8) are stable
under base change, hence if $f'$ has property $\mathcal{P}$, then so
does $f$. See Spaces, Lemma \ref{spaces-lemma-base-change-immersions},
and
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-base-change-proper},
\ref{spaces-morphisms-lemma-base-change-integral}, and
\ref{spaces-morphisms-lemma-base-change-monomorphism}.
Hence in each case we need only to prove that if $f$ has
the desired property, so does $f'$.

\medskip\noindent
Case (2) follows from case (5) of Lemma \ref{lemma-thicken-property-morphisms}
and the fact that the finite morphisms are precisely
the integral morphisms that are locally of finite type
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-integral}).

\medskip\noindent
Case (3). This follows immediately from
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-check-closed-infinitesimally}.

\medskip\noindent
Proof of (6). As $f$ is a monomorphism we have $X = X \times_Y X$.
We may apply the results proved so far to the morphism of thickenings
$(X \subset X') \to (X \times_Y X \subset X' \times_{Y'} X')$.
We conclude $\Delta_{X'/Y'} : X' \to X' \times_{Y'} X'$
is a closed immersion by (3). In fact $\Delta_{X'/Y'}$ induces a bijection
$|X'| \to |X' \times_{Y'} X'|$, hence $\Delta_{X'/Y'}$ is a thickening.
On the other hand $\Delta_{X'/Y'}$ is locally of finite presentation by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-diagonal-morphism-finite-type}.
In other words, $\Delta_{X'/Y'}(X')$ is cut out by
a quasi-coherent sheaf of ideals
$\mathcal{J} \subset \mathcal{O}_{X' \times_{Y'} X'}$ of finite type.
Since $\Omega_{X'/Y'} = 0$ by (5) we see that
the conormal sheaf of $X' \to X' \times_{Y'} X'$ is zero.
(The conormal sheaf of the closed immersion $\Delta_{X'/Y'}$ is equal to
$\Omega_{X'/Y'}$; this is the analogue of
Morphisms, Lemma \ref{morphisms-lemma-differentials-diagonal}
for algebraic spaces and follows either by \'etale localization
or by combining
Lemmas \ref{lemma-differentials-relative-immersion-section} and
\ref{lemma-differential-product}; some details omitted.)
In other words, $\mathcal{J}/\mathcal{J}^2 = 0$.
This implies $\Delta_{X'/Y'}$ is an isomorphism, for example
by Algebra, Lemma \ref{algebra-lemma-ideal-is-squared-union-connected}.

\medskip\noindent
Proof of (7). If $f : X \to Y$ is an immersion, then it factors as
$X \to V \to Y$ where $V \to Y$ is an open subspace and $X \to V$ is a
closed immersion, see
Morphisms of Spaces, Remark \ref{spaces-morphisms-remark-immersion}.
Let $V' \subset Y'$ be the open subspace whose
underlying topological space $|V'|$ is the same as $|V| \subset |Y| = |Y'|$.
Then $X' \to Y'$ factors through $V'$ and we conclude that $X' \to V'$
is a closed immersion by part (3).

\medskip\noindent
Case (8) follows from Lemma \ref{lemma-thicken-property-morphisms}
and the definition of proper morphisms as being the quasi-compact,
universally closed, and separated morphisms that are locally of finite type.
\end{proof}










\section{Picard groups of thickenings}
\label{section-picard-group-thickening}

\noindent
Some material on Picard groups of thickenings.

\begin{lemma}
\label{lemma-picard-group-first-order-thickening}
Let $S$ be a scheme. Let $X \subset X'$ be a first order thickening
of algebraic spaces over $S$ with ideal sheaf $\mathcal{I}$.
Then there is a canonical exact sequence
$$
\xymatrix{
0 \ar[r] &
H^0(X, \mathcal{I}) \ar[r] &
H^0(X', \mathcal{O}_{X'}^*) \ar[r] &
H^0(X, \mathcal{O}^*_X) \ar `r[d] `d[l] `l[llld] `d[dll] [dll] \\
& H^1(X, \mathcal{I}) \ar[r] &
\Pic(X') \ar[r] &
\Pic(X) \ar `r[d] `d[l] `l[llld] `d[dll] [dll] \\
& H^2(X, \mathcal{I}) \ar[r] & \ldots \ar[r] & \ldots
}
$$
of abelian groups.
\end{lemma}

\begin{proof}
Recall that $X_\etale = X'_\etale$, see
Lemma \ref{lemma-thickening-equivalence} and more generally the
discussion in Section \ref{section-thickenings}.
The sequence of the lemma is the long exact cohomology sequence
associated to the short exact sequence of sheaves of abelian groups
$$
0 \to \mathcal{I} \to \mathcal{O}_{X'}^* \to \mathcal{O}_X^* \to 0
$$
on $X_\etale$ where the first map sends a local section $f$ of $\mathcal{I}$
to the invertible section $1 + f$ of $\mathcal{O}_{X'}$.
We also use the identification of the Picard group of a
ringed site with the first cohomology group of the sheaf
of invertible functions, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-h1-invertible}.
\end{proof}








\section{Infinitesimal neighbourhoods}
\label{section-first-order-infinitesimal-neighbourhood}

\noindent
A natural construction of finite order thickenings is the following.
Suppose that $i : Z \to X$ be an immersion of algebraic spaces. Choose an
open subspace $U \subset X$ such that $i$ identifies $Z$ with a closed
subspace $Z \subset U$ (see
Morphisms of Spaces, Remark \ref{spaces-morphisms-remark-immersion}).
Let $\mathcal{I} \subset \mathcal{O}_U$ be the
quasi-coherent sheaf of ideals defining $Z$ in $U$, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-closed-immersion-ideals}.
For $n \geq 1$ we can consider the closed subspace $Z_n \subset U$
defined by the quasi-coherent sheaf of ideals $\mathcal{I}^{n + 1}$.

\begin{definition}
\label{definition-first-order-infinitesimal-neighbourhood}
Let $i : Z \to X$ be an immersion of algebraic spaces.
\begin{enumerate}
\item The {\it first order infinitesimal neighbourhood} of $Z$ in $X$ is
the first order thickening $Z \subset Z_1$ over $X$ described above.
\item The {\it $n$th order infinitesimal neighbourhood} of $Z$ in $X$ is
the $n$th order thickening $Z \subset Z_n$ over $X$ described above.
\end{enumerate}
\end{definition}

\noindent
This thickening has the following universal property (which will assuage
any fears that the construction above depends on the choice of the open
$U$).

\begin{lemma}
\label{lemma-first-order-infinitesimal-neighbourhood}
Let $i : Z \to X$ be an immersion of algebraic spaces.
\begin{enumerate}
\item The first order infinitesimal neighbourhood $Z'$ of $Z$ in $X$
has the following universal property:
Given any commutative diagram
$$
\xymatrix{
Z \ar[d]_i & T \ar[l]^a \ar[d] \\
X & T' \ar[l]_b
}
$$
where $T \subset T'$ is a first order thickening over $X$, there exists
a unique morphism $(a', a) : (T \subset T') \to (Z \subset Z')$ of
thickenings over $X$.
\item For $n \geq 1$ the $n$th order infinitesimal neighbourhood
$Z_n$ of $Z$ in $X$ has the following universal property:
Given any commutative diagram
$$
\xymatrix{
Z \ar[d]_i & T \ar[l]^a \ar[d] \\
X & T' \ar[l]_b
}
$$
where $T \subset T'$ is an $n$th order thickening over $X$, there exists
a unique morphism $(a', a) : (T \subset T') \to (Z \subset Z_n)$ of
thickenings over $X$.
\end{enumerate}
\end{lemma}

\begin{proof}
We will only prove (1).
Let $U \subset X$ be the open subspace used in the construction of $Z'$,
i.e., an open such that $Z$ is identified with a closed subspace of $U$
cut out by the quasi-coherent sheaf of ideals $\mathcal{I}$.
Since $|T| = |T'|$ we see that $|b|(|T'|) \subset |U|$. Hence we can
think of $b$ as a morphism into $U$, see
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-factor-through-open-subspace}.
Let $\mathcal{J} \subset \mathcal{O}_{T'}$
be the square zero quasi-coherent sheaf of ideals cutting out $T$.
By the commutativity of the diagram we have $b|_T = i \circ a$ where
$i : Z \to U$ is the closed immersion. We conclude that
$b^\sharp(b^{-1}\mathcal{I}) \subset \mathcal{J}$ by
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-closed-immersion-ideals}.
As $T'$ is a first order thickening of $T$ we see that $\mathcal{J}^2 = 0$
hence $b^\sharp(b^{-1}(\mathcal{I}^2)) = 0$. By
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-closed-immersion-ideals}
this implies that $b$ factors through $Z'$. Letting $a' : T' \to Z'$
be this factorization we win.
\end{proof}

\begin{lemma}
\label{lemma-infinitesimal-neighbourhood-conormal}
Let $i : Z \to X$ be an immersion of algebraic spaces.
Let $Z \subset Z'$ be the first order infinitesimal neighbourhood
of $Z$ in $X$. Then the diagram
$$
\xymatrix{
Z \ar[r] \ar[d] & Z' \ar[d] \\
Z \ar[r] & X
}
$$
induces a map of conormal sheaves
$\mathcal{C}_{Z/X} \to \mathcal{C}_{Z/Z'}$ by
Lemma \ref{lemma-conormal-functorial}.
This map is an isomorphism.
\end{lemma}

\begin{proof}
This is clear from the construction of $Z'$ above.
\end{proof}





\section{Formally smooth, \'etale, unramified transformations}
\label{section-formally-smooth-etale-unramified}

\noindent
Recall that a ring map $R \to A$ is called
{\it formally smooth}, resp.\ {\it formally \'etale},
resp.\ {\it formally unramified}
(see Algebra, Definition \ref{algebra-definition-formally-smooth},
resp.\ Definition \ref{algebra-definition-formally-etale},
resp.\ Definition \ref{algebra-definition-formally-unramified})
if for every commutative solid diagram
$$
\xymatrix{
A \ar[r] \ar@{-->}[rd] & B/I \\
R \ar[r] \ar[u] & B \ar[u]
}
$$
where $I \subset B$ is an ideal of square zero, there
exists a, resp.\ exists a unique, resp.\ exists at most one dotted
arrow which makes the diagram commute. This motivates
the following analogue for morphisms of algebraic spaces, and more
generally functors.

\begin{definition}
\label{definition-formally-smooth-etale-unramified}
Let $S$ be a scheme.
Let $a : F \to G$ be a transformation of functors
$F, G : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$.
Consider commutative solid diagrams of the form
$$
\xymatrix{
F \ar[d]_a & T \ar[d]^i \ar[l] \\
G & T' \ar[l] \ar@{-->}[lu]
}
$$
where $T$ and $T'$ are affine schemes and $i$ is a closed immersion
defined by an ideal of square zero.
\begin{enumerate}
\item We say $a$ is {\it formally smooth} if given any solid
diagram as above there exists a dotted arrow making the diagram
commute\footnote{This is just one possible definition that one can
make here. Another slightly weaker condition would be to require that
the dotted arrow exists fppf locally on $T'$. This weaker notion
has in some sense better formal properties.}.
\item We say $a$ is {\it formally \'etale} if given any solid
diagram as above there exists exactly one dotted arrow making the diagram
commute.
\item We say $a$ is {\it formally unramified} if given any solid
diagram as above there exists at most one dotted arrow making the diagram
commute.
\end{enumerate}
\end{definition}

\begin{lemma}
\label{lemma-formally-etale-is-combination}
Let $S$ be a scheme.
Let $a : F \to G$ be a transformation of functors
$F, G : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$.
Then $a$ is formally \'etale if and only if $a$ is both formally
smooth and formally unramified.
\end{lemma}

\begin{proof}
Formal from the definition.
\end{proof}

\begin{lemma}
\label{lemma-composition-formally-smooth-etale-unramified}
Composition.
\begin{enumerate}
\item A composition of formally smooth transformations of functors is formally
smooth.
\item A composition of formally \'etale transformations of functors is formally
\'etale.
\item A composition of formally unramified transformations of functors is
formally unramified.
\end{enumerate}
\end{lemma}

\begin{proof}
This is formal.
\end{proof}

\begin{lemma}
\label{lemma-base-change-formally-smooth-etale-unramified}
Let $S$ be a scheme contained in $\Sch_{fppf}$.
Let $F, G, H : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$.
Let $a : F \to G$, $b : H \to G$ be transformations of functors.
Consider the fibre product diagram
$$
\xymatrix{
H \times_{b, G, a} F \ar[r]_-{b'} \ar[d]_{a'} & F \ar[d]^a \\
H \ar[r]^b & G
}
$$
\begin{enumerate}
\item If $a$ is formally smooth, then the base change $a'$ is
formally smooth.
\item If $a$ is formally \'etale, then the base change $a'$ is
formally \'etale.
\item If $a$ is formally unramified, then the base change $a'$ is
formally unramified.
\end{enumerate}
\end{lemma}

\begin{proof}
This is formal.
\end{proof}

\begin{lemma}
\label{lemma-representable-property-formally-property}
Let $S$ be a scheme.
Let $F, G : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$.
Let $a : F \to G$ be a representable transformation of functors.
\begin{enumerate}
\item If $a$ is smooth then $a$ is formally smooth.
\item If $a$ is \'etale, then $a$ is formally \'etale.
\item If $a$ is unramified, then $a$ is formally unramified.
\end{enumerate}
\end{lemma}

\begin{proof}
Consider a solid commutative diagram
$$
\xymatrix{
F \ar[d]_a & T \ar[d]^i \ar[l] \\
G & T' \ar[l] \ar@{-->}[lu]
}
$$
as in
Definition \ref{definition-formally-smooth-etale-unramified}.
Then $F \times_G T'$ is a scheme smooth (resp.\ \'etale, resp.\ unramified)
over $T'$. Hence by
More on Morphisms, Lemma \ref{more-morphisms-lemma-smooth-formally-smooth}
(resp.\ Lemma \ref{more-morphisms-lemma-etale-formally-etale},
resp.\ Lemma \ref{more-morphisms-lemma-unramified-formally-unramified})
we can fill in (resp.\ uniquely fill in, resp.\ fill in at most
one way) the dotted arrow in the diagram
$$
\xymatrix{
F \times_G T' \ar[d] & T \ar[d]^i \ar[l] \\
T' & T' \ar[l] \ar@{-->}[lu]
}
$$
an hence we also obtain the corresponding assertion in the first diagram.
\end{proof}

\begin{lemma}
\label{lemma-etale-on-top}
Let $S$ be a scheme contained in $\Sch_{fppf}$.
Let $F, G, H : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$.
Let $a : F \to G$, $b : G \to H$ be transformations of functors.
Assume that $a$ is representable, surjective, and \'etale.
\begin{enumerate}
\item If $b$ is formally smooth, then $b \circ a$ is formally smooth.
\item If $b$ is formally \'etale, then $b \circ a$ is formally \'etale.
\item If $b$ is formally unramified, then $b \circ a$ is formally unramified.
\end{enumerate}
Conversely, consider a solid commutative diagram
$$
\xymatrix{
G \ar[d]_b & T \ar[d]^i \ar[l] \\
H & T' \ar[l] \ar@{-->}[lu]
}
$$
with $T'$ an affine scheme over $S$
and $i : T \to T'$ a closed immersion defined by an ideal of square zero.
\begin{enumerate}
\item[(4)] If $b \circ a$ is formally smooth, then for every $t \in T$
there exists an \'etale morphism of affines $U' \to T'$ and a morphism
$U' \to G$ such that
$$
\xymatrix{
G \ar[d]_b & T \ar[l] & T \times_{T'} U' \ar[d] \ar[l]\\
H & T' \ar[l] & U' \ar[llu] \ar[l]
}
$$
commutes and $t$ is in the image of $U' \to T'$.
\item[(5)] If $b \circ a$ is formally unramified, then there exists at most
one dotted arrow in the diagram above, i.e., $b$ is formally unramified.
\item[(6)] If $b \circ a$ is formally \'etale, then there exists exactly one
dotted arrow in the diagram above, i.e., $b$ is formally \'etale.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $b$ is formally smooth (resp.\ formally \'etale,
resp.\ formally unramified). Since an \'etale morphism is both
smooth and unramified we see that $a$ is representable and smooth
(resp.\ \'etale, resp. unramified). Hence parts (1), (2) and (3)
follow from a combination of
Lemma \ref{lemma-representable-property-formally-property}
and
Lemma \ref{lemma-composition-formally-smooth-etale-unramified}.

\medskip\noindent
Assume that $b \circ a$ is formally smooth. Consider a diagram
as in the statement of the lemma. Let $W = F \times_G T$.
By assumption $W$ is a scheme surjective \'etale over $T$. By
\'Etale Morphisms, Theorem \ref{etale-theorem-remarkable-equivalence}
there exists a scheme $W'$ \'etale over $T'$ such that $W = T \times_{T'} W'$.
Choose an affine open subscheme $U' \subset W'$ such that $t$ is in
the image of $U' \to T'$. Because $b \circ a$ is formally
smooth we see that the exist morphisms $U' \to F$ such that
$$
\xymatrix{
F \ar[d]_{b \circ a} & W \ar[l] & T \times_{T'} U' \ar[d] \ar[l]\\
H & T' \ar[l] & U' \ar[llu] \ar[l]
}
$$
commutes. Taking the composition $U' \to F \to G$ gives a
map as in part (5) of the lemma.

\medskip\noindent
Assume that $f, g : T' \to G$ are two dotted arrows fitting into the
diagram of the lemma. Let $W = F \times_G T$.
By assumption $W$ is a scheme surjective \'etale over $T$. By
\'Etale Morphisms, Theorem \ref{etale-theorem-remarkable-equivalence}
there exists a scheme $W'$ \'etale over $T'$ such that $W = T \times_{T'} W'$.
Since $a$ is formally \'etale the compositions
$$
W' \to T' \xrightarrow{f} G
\quad\text{and}\quad
W' \to T' \xrightarrow{g} G
$$
lift to morphisms $f', g' : W' \to F$ (lift on affine opens and glue by
uniqueness). Now if $b \circ a : F \to H$ is formally unramified, then
$f' = g'$ and hence $f = g$ as $W' \to T'$ is an \'etale covering. This proves
part (6) of the lemma.

\medskip\noindent
Assume that $b \circ a$ is formally \'etale. Then by part (4) we
can \'etale locally on $T'$ find a dotted arrow fitting into the diagram
and by part (5) this dotted arrow is unique. Hence we may glue the
local solutions to get assertion (6). Some details omitted.
\end{proof}

\begin{remark}
\label{remark-tempting}
It is tempting to think that in the situation of
Lemma \ref{lemma-etale-on-top}
we have
``$b$ formally smooth'' $\Leftrightarrow$ ``$b \circ a$ formally smooth''.
However, this is likely not true in general.
\end{remark}

\begin{lemma}
\label{lemma-formally-permanence}
Let $S$ be a scheme.
Let $F, G, H : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$.
Let $a : F \to G$, $b : G \to H$ be transformations of functors.
Assume $b$ is formally unramified.
\begin{enumerate}
\item If $b \circ a$ is formally unramified then $a$ is formally unramified.
\item If $b \circ a$ is formally \'etale then $a$ is formally \'etale.
\item If $b \circ a$ is formally smooth then $a$ is formally smooth.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $T \subset T'$ be a closed immersion of affine schemes defined by an ideal
of square zero. Let $g' : T' \to G$ and $f : T \to F$ be given such that
$g'|_T = a \circ f$. Because $b$ is formally unramified, there is a one
to one correspondence between
$$
\{f' : T' \to F \mid f = f'|_T\text{ and }a \circ f' = g'\}
$$
and
$$
\{f' : T' \to F \mid f = f'|_T\text{ and }b \circ a \circ f' = b \circ g'\}.
$$
From this the lemma follows formally.
\end{proof}








\section{Formally unramified morphisms}
\label{section-formally-unramified}

\noindent
In this section we work out what it means that a morphism of algebraic spaces
is formally unramified.

\begin{definition}
\label{definition-formally-unramified}
Let $S$ be a scheme. A morphism $f : X \to Y$ of algebraic spaces over $S$
is said to be {\it formally unramified} if it is formally unramified as a
transformation of functors as in
Definition \ref{definition-formally-smooth-etale-unramified}.
\end{definition}

\noindent
We will not restate the results proved in the more general setting of
formally unramified transformations of functors in
Section \ref{section-formally-smooth-etale-unramified}.
It turns out we can characterize this property in terms of vanishing of the
module of relative differentials, see
Lemma \ref{lemma-characterize-formally-unramified}.

\begin{lemma}
\label{lemma-formally-unramified}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces over
$S$. The following are equivalent:
\begin{enumerate}
\item $f$ is formally unramified,
\item for every diagram
$$
\xymatrix{
U \ar[d] \ar[r]_\psi & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$ and $V$ are schemes and the vertical arrows are \'etale
the morphism of schemes $\psi$ is formally unramified (as in
More on Morphisms,
Definition \ref{more-morphisms-definition-formally-unramified}), and
\item for one such diagram with surjective vertical arrows the morphism
$\psi$ is formally unramified.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $f$ is formally unramified. By
Lemma \ref{lemma-representable-property-formally-property}
the morphisms $U \to X$ and $V \to Y$ are formally unramified. Thus by
Lemma \ref{lemma-composition-formally-smooth-etale-unramified}
the composition $U \to Y$ is formally unramified. Then it follows from
Lemma \ref{lemma-formally-permanence}
that $U \to V$ is formally unramified. Thus (1) implies (2). And (2)
implies (3) trivially

\medskip\noindent
Assume given a diagram as in (3). By
Lemma \ref{lemma-representable-property-formally-property}
the morphism $V \to Y$ is formally unramified. Thus by
Lemma \ref{lemma-composition-formally-smooth-etale-unramified}
the composition $U \to Y$ is formally unramified. Then it follows from
Lemma \ref{lemma-etale-on-top}
that $X \to Y$ is formally unramified, i.e., (1) holds.
\end{proof}

\begin{lemma}
\label{lemma-formally-unramified-not-affine}
Let $S$ be a scheme.
If $f : X \to Y$ is a formally unramified morphism of algebraic spaces
over $S$, then given any solid commutative diagram
$$
\xymatrix{
X \ar[d]_f & T \ar[d]^i \ar[l] \\
Y & T' \ar[l] \ar@{-->}[lu]
}
$$
where $T \subset T'$ is a first order thickening of algebraic spaces
over $S$ there exists at most one dotted arrow making the diagram commute.
In other words, in
Definition \ref{definition-formally-unramified}
the condition that $T$ be an affine scheme may be dropped.
\end{lemma}

\begin{proof}
This is true because there exists a surjective \'etale morphism
$U' \to T'$ where $U'$ is a disjoint union of affine schemes (see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-cover-by-union-affines})
and a morphism $T' \to X$ is determined by its restriction to $U'$.
\end{proof}

\begin{lemma}
\label{lemma-composition-formally-unramified}
A composition of formally unramified morphisms is formally unramified.
\end{lemma}

\begin{proof}
This is formal.
\end{proof}

\begin{lemma}
\label{lemma-base-change-formally-unramified}
A base change of a formally unramified morphism is formally unramified.
\end{lemma}

\begin{proof}
This is formal.
\end{proof}

\begin{lemma}
\label{lemma-characterize-formally-unramified}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces over
$S$. The following are equivalent:
\begin{enumerate}
\item $f$ is formally unramified, and
\item $\Omega_{X/Y} = 0$.
\end{enumerate}
\end{lemma}

\begin{proof}
This is a combination of
Lemma \ref{lemma-formally-unramified},
More on Morphisms,
Lemma \ref{more-morphisms-lemma-formally-unramified-differentials},
and
Lemma \ref{lemma-localize-differentials}.
\end{proof}

\begin{lemma}
\label{lemma-unramified-formally-unramified}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The following are equivalent:
\begin{enumerate}
\item The morphism $f$ is unramified,
\item the morphism $f$ is locally of finite type and $\Omega_{X/Y} = 0$, and
\item the morphism $f$ is locally of finite type and formally unramified.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a diagram
$$
\xymatrix{
U \ar[d] \ar[r]_\psi & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$ and $V$ are schemes and the vertical arrows are \'etale and
surjective. Then we see
\begin{align*}
f\text{ unramified}
& \Leftrightarrow
\psi\text{ unramified} \\
& \Leftrightarrow
\psi\text{ locally finite type and }\Omega_{U/V} = 0 \\
& \Leftrightarrow
f\text{ locally finite type and }\Omega_{X/Y} = 0 \\
& \Leftrightarrow
f\text{ locally finite type and formally unramified}
\end{align*}
Here we have used
Morphisms, Lemma \ref{morphisms-lemma-unramified-omega-zero} and
Lemma \ref{lemma-characterize-formally-unramified}.
\end{proof}

\begin{lemma}
\label{lemma-universally-injective-unramified}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The following are equivalent:
\begin{enumerate}
\item $f$ is unramified and a monomorphism,
\item $f$ is unramified and universally injective,
\item $f$ is locally of finite type and a monomorphism,
\item $f$ is universally injective, locally of finite type, and
formally unramified.
\end{enumerate}
Moreover, in this case $f$ is also representable, separated, and
locally quasi-finite.
\end{lemma}

\begin{proof}
We have seen in
Lemma \ref{lemma-unramified-formally-unramified}
that being formally unramified and locally of finite type is the same thing
as being unramified.
Hence (4) is equivalent to (2).
A monomorphism is certainly formally unramified hence (3) implies (4).
It is clear that (1) implies (3). Finally, if (2) holds, then
$\Delta : X \to X \times_Y X$ is both an open immersion
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-diagonal-unramified-morphism})
and surjective
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-injective})
hence an isomorphism, i.e., $f$ is a monomorphism. In this way we see that
(2) implies (1).
Finally, we see that $f$ is representable, separated, and locally
quasi-finite by
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-monomorphism-loc-finite-type-loc-quasi-finite} and
\ref{spaces-morphisms-lemma-locally-quasi-finite-separated-representable}.
\end{proof}

\begin{lemma}
\label{lemma-characterize-closed-immersion}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The following are equivalent:
\begin{enumerate}
\item $f$ is a closed immersion,
\item $f$ is universally closed, unramified, and a monomorphism,
\item $f$ is universally closed, unramified, and universally injective,
\item $f$ is universally closed, locally of finite type, and a monomorphism,
\item $f$ is universally closed, universally injective, locally of
finite type, and formally unramified.
\end{enumerate}
\end{lemma}

\begin{proof}
The equivalence of (2) -- (5) follows immediately from
Lemma \ref{lemma-universally-injective-unramified}.
Moreover, if (2) -- (5) are satisfied then $f$ is representable.
Similarly, if (1) is satisfied then $f$ is representable.
Hence the result follows from the case of schemes, see
\'Etale Morphisms, Lemma \ref{etale-lemma-characterize-closed-immersion}.
\end{proof}





\section{Universal first order thickenings}
\label{section-universal-thickening}

\noindent
Let $S$ be a scheme.
Let $h : Z \to X$ be a morphism of algebraic spaces over $S$.
A {\it universal first order thickening} of $Z$ over $X$ is a
first order thickening $Z \subset Z'$ over $X$ such that given
any first order thickening $T \subset T'$
over $X$ and a solid commutative diagram
\begin{equation}
\label{equation-universal-first-order-thickening}
\vcenter{
\xymatrix{
& Z \ar[ld] & & T \ar[rd] \ar[ll]^a \\
Z' \ar[rrd] & & & & T' \ar@{..>}[llll]_{a'} \ar[lld]^b \\
 & & X
}
}
\end{equation}
there exists a unique dotted arrow making the diagram commute.
Note that in this situation $(a, a') : (T \subset T') \to (Z \subset Z')$
is a morphism of thickenings over $X$. Thus if a universal first order
thickening exists, then it is unique up to unique isomorphism.
In general a universal first order thickening
does not exist, but if $h$ is formally unramified then it does.
Before we prove this, let us show that a universal first order thickening
in the category of schemes is a universal first order thickening in the
category of algebraic spaces.

\begin{lemma}
\label{lemma-check-universal-first-order-thickening}
Let $S$ be a scheme.
Let $h : Z \to X$ be a morphism of algebraic spaces over $S$.
Let $Z \subset Z'$ be a first order thickening over $X$.
The following are equivalent
\begin{enumerate}
\item $Z \subset Z'$ is a universal first order thickening,
\item for any diagram (\ref{equation-universal-first-order-thickening})
with $T'$ a scheme a unique dotted arrow exists making the diagram commute, and
\item for any diagram (\ref{equation-universal-first-order-thickening})
with $T'$ an affine scheme a unique dotted arrow exists making the
diagram commute.
\end{enumerate}
\end{lemma}

\begin{proof}
The implications (1) $\Rightarrow$ (2) $\Rightarrow$ (3) are formal.
Assume (3) a assume given an arbitrary diagram
(\ref{equation-universal-first-order-thickening}).
Choose a presentation $T' = U'/R'$, see
Spaces, Definition \ref{spaces-definition-presentation}.
We may assume that $U' = \coprod U'_i$ is a disjoint union
of affines, so $R' = U' \times_{T'} U' = \coprod_{i, j} U'_i \times_T' U'_j$.
For each pair $(i, j)$ choose an affine open covering
$U'_i \times_T' U'_j = \bigcup_k R'_{ijk}$. Denote $U_i, R_{ijk}$
the fibre products with $T$ over $T'$. Then each
$U_i \subset U'_i$ and $R_{ijk} \subset R'_{ijk}$
is a first order thickening of affine schemes.
Denote $a_i : U_i \to Z$, resp.\ $a_{ijk} : R_{ijk} \to Z$
the composition of $a : T \to Z$ with the morphism
$U_i \to T$, resp.\ $R_{ijk} \to T$.
By (3) applied to $a_i : U_i \to Z$
we obtain unique morphisms $a'_i : U'_i \to Z'$.
By (3) applied to $a_{ijk}$ we see that the two compositions
$R'_{ijk} \to R'_i \to Z'$ and $R'_{ijk} \to R'_j \to Z'$
are equal. Hence $a' = \coprod a'_i : U' = \coprod U'_i \to Z'$
descends to the quotient sheaf $T' = U'/R'$ and we win.
\end{proof}

\begin{lemma}
\label{lemma-universal-thickening-over-formally-etale}
Let $S$ be a scheme.
Let $Z \to Y \to X$ be morphisms of algebraic spaces over $S$.
If $Z \subset Z'$ is a universal first order thickening of
$Z$ over $Y$ and $Y \to X$ is formally \'etale, then $Z \subset Z'$ is
a universal first order thickening of $Z$ over $X$.
\end{lemma}

\begin{proof}
This is formal. Namely, by
Lemma \ref{lemma-check-universal-first-order-thickening}
it suffices to consider solid commutative diagrams
(\ref{equation-universal-first-order-thickening})
with $T'$ an affine scheme. The composition
$T \to Z \to Y$ lifts uniquely to $T' \to Y$ as $Y \to X$ is
assumed formally \'etale. Hence the fact that
$Z \subset Z'$ is a universal first order thickening over $Y$
produces the desired morphism $a' : T' \to Z'$.
\end{proof}

\begin{lemma}
\label{lemma-etale-morphism-of-universal-thickenings}
Let $S$ be a scheme.
Let $Z \to Y \to X$ be morphisms of algebraic spaces over $S$.
Assume $Z \to Y$ is \'etale.
\begin{enumerate}
\item If $Y \subset Y'$ is a universal first order thickening of
$Y$ over $X$, then the unique \'etale morphism $Z' \to Y'$ such
that $Z = Y \times_{Y'} Z'$ (see
Theorem \ref{theorem-topological-invariance})
is a universal first order thickening of $Z$ over $X$.
\item If $Z \to Y$ is surjective and
$(Z \subset Z') \to (Y \subset Y')$ is an \'etale morphism
of first order thickenings over $X$ and $Z'$ is a universal first
order thickening of $Z$ over $X$, then $Y'$ is a universal first
order thickening of $Y$ over $X$.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). By
Lemma \ref{lemma-check-universal-first-order-thickening}
it suffices to consider solid commutative diagrams
(\ref{equation-universal-first-order-thickening})
with $T'$ an affine scheme. The composition
$T \to Z \to Y$ lifts uniquely to $T' \to Y'$ as $Y'$ is
the universal first order thickening. Then the fact that
$Z' \to Y'$ is \'etale implies (see
Lemma \ref{lemma-representable-property-formally-property})
that $T' \to Y'$ lifts to the
desired morphism $a' : T' \to Z'$.

\medskip\noindent
Proof of (2). Let $T \subset T'$ be a first order thickening over
$X$ and let $a : T \to Y$ be a morphism. Set $W = T \times_Y Z$
and denote $c : W \to Z$ the projection
Let $W' \to T'$ be the unique \'etale morphism such that
$W = T \times_{T'} W'$, see
Theorem \ref{theorem-topological-invariance}.
Note that $W' \to T'$ is surjective as $Z \to Y$ is surjective.
By assumption we obtain a unique morphism $c' : W' \to Z'$
over $X$ restricting to $c$ on $W$. By uniqueness the two restrictions
of $c'$ to $W' \times_{T'} W'$ are equal (as the two restrictions of
$c$ to $W \times_T W$ are equal). Hence $c'$ descends to a unique
morphism $a' : T' \to Y'$ and we win.
\end{proof}

\begin{lemma}
\label{lemma-universal-thickening}
Let $S$ be a scheme.
Let $h : Z \to X$ be a formally unramified morphism of algebraic
spaces over $S$.
There exists a universal first order thickening $Z \subset Z'$ of
$Z$ over $X$.
\end{lemma}

\begin{proof}
Choose any commutative diagram
$$
\xymatrix{
V \ar[d] \ar[r] & U \ar[d] \\
Z \ar[r] & X
}
$$
where $V$ and $U$ are schemes and the vertical arrows are \'etale.
Note that $V \to U$ is a formally unramified morphism of schemes, see
Lemma \ref{lemma-formally-unramified}.
Combining
Lemma \ref{lemma-check-universal-first-order-thickening}
and
More on Morphisms, Lemma \ref{more-morphisms-lemma-universal-thickening}
we see that a universal first order thickening $V \subset V'$
of $V$ over $U$ exists. By
Lemma \ref{lemma-universal-thickening-over-formally-etale} part (1)
$V'$ is a universal first order thickening of $V$ over $X$.

\medskip\noindent
Fix a scheme $U$ and a surjective \'etale morphism $U \to X$.
The argument above shows that for any $V \to Z$ \'etale with $V$
a scheme such that $V \to Z \to X$ factors through $U$ a
universal first order thickening $V \subset V'$ of $V$ over $X$
exists (but does not depend on the chosen factorization of $V \to X$
through $U$). Now we may choose $V$ such that $V \to Z$ is surjective
\'etale (see
Spaces, Lemma \ref{spaces-lemma-lift-morphism-presentations}).
Then $R = V \times_Z V$ a scheme \'etale over $Z$ such that
$R \to X$ factors through $U$ also.
Hence we obtain universal first order thickenings
$V \subset V'$ and $R \subset R'$ over $X$.
As $V \subset V'$ is a universal first order thickening,
the two projections $s, t : R \to V$ lift to morphisms
$s', t': R' \to V'$. By
Lemma \ref{lemma-etale-morphism-of-universal-thickenings}
as $R'$ is the universal first order thickening of $R$ over $X$
these morphisms are \'etale.
Then $(t', s') : R' \to V'$ is an \'etale equivalence relation
and we can set $Z' = V'/R'$. Since $V' \to Z'$ is surjective \'etale
and $v'$ is the universal first order thickening of $V$ over $X$
we conclude from
Lemma \ref{lemma-universal-thickening-over-formally-etale} part (2)
that $Z'$ is a universal first order thickening of $Z$ over $X$.
\end{proof}

\begin{definition}
\label{definition-universal-thickening}
Let $S$ be a scheme.
Let $h : Z \to X$ be a formally unramified morphism of
algebraic spaces over $S$.
\begin{enumerate}
\item The {\it universal first order thickening} of $Z$ over $X$
is the thickening $Z \subset Z'$ constructed in
Lemma \ref{lemma-universal-thickening}.
\item The {\it conormal sheaf of $Z$ over $X$} is the conormal sheaf
of $Z$ in its universal first order thickening $Z'$ over $X$.
\end{enumerate}
We often denote the conormal sheaf $\mathcal{C}_{Z/X}$ in this situation.
\end{definition}

\noindent
Thus we see that there is a short exact sequence of sheaves
$$
0 \to \mathcal{C}_{Z/X} \to \mathcal{O}_{Z'} \to \mathcal{O}_Z \to 0
$$
on $Z_\etale$ and $\mathcal{C}_{Z/X}$ is a quasi-coherent
$\mathcal{O}_Z$-module. The following lemma proves that there is no
conflict between this definition and the definition in case $Z \to X$
is an immersion.

\begin{lemma}
\label{lemma-immersion-universal-thickening}
Let $S$ be a scheme.
Let $i : Z \to X$ be an immersion of algebraic spaces over $S$. Then
\begin{enumerate}
\item $i$ is formally unramified,
\item the universal first order thickening of $Z$ over $X$ is the first order
infinitesimal neighbourhood of $Z$ in $X$ of
Definition \ref{definition-first-order-infinitesimal-neighbourhood},
\item the conormal sheaf of $i$ in the sense of
Definition \ref{definition-conormal-sheaf}
agrees with the conormal sheaf of $i$ in the sense of
Definition \ref{definition-universal-thickening}.
\end{enumerate}
\end{lemma}

\begin{proof}
An immersion of algebraic spaces is by definition a representable morphism.
Hence by
Morphisms, Lemmas \ref{morphisms-lemma-open-immersion-unramified} and
\ref{morphisms-lemma-closed-immersion-unramified}
an immersion is unramified (via the abstract principle of
Spaces, Lemma
\ref{spaces-lemma-representable-transformations-property-implication}).
Hence it is formally unramified by
Lemma \ref{lemma-unramified-formally-unramified}.
The other assertions follow by combining
Lemmas \ref{lemma-first-order-infinitesimal-neighbourhood} and
\ref{lemma-infinitesimal-neighbourhood-conormal}
and the definitions.
\end{proof}

\begin{lemma}
\label{lemma-universal-thickening-unramified}
Let $S$ be a scheme.
Let $Z \to X$ be a formally unramified morphism of algebraic spaces over $S$.
Then the universal first order thickening $Z'$ is formally
unramified over $X$.
\end{lemma}

\begin{proof}
Let $T \subset T'$ be a first order thickening of affine schemes over $X$.
Let
$$
\xymatrix{
Z' \ar[d] & T \ar[l]^c \ar[d] \\
X & T' \ar[l] \ar[lu]^{a, b}
}
$$
be a commutative diagram. Set $T_0 = c^{-1}(Z) \subset T$ and
$T'_a = a^{-1}(Z)$ (scheme theoretically).
Since $Z'$ is a first order thickening of $Z$, we see that $T'$
is a first order thickening of $T'_a$. Moreover, since $c = a|_T$ we see that
$T_0 = T \cap T'_a$ (scheme theoretically). As $T'$ is a first order
thickening of $T$ it follows that $T'_a$
is a first order thickening of $T_0$. Now $a|_{T'_a}$ and $b|_{T'_a}$
are morphisms of $T'_a$ into $Z'$ over $X$ which agree on $T_0$ as
morphisms into $Z$. Hence by the universal property of $Z'$ we conclude that
$a|_{T'_a} = b|_{T'_a}$. Thus $a$ and $b$ are morphism from
the first order thickening $T'$ of $T'_a$ whose restrictions to
$T'_a$ agree as morphisms into $Z$. Thus using the universal property of
$Z'$ once more we conclude that $a = b$. In other words, the defining
property of a formally unramified morphism holds for $Z' \to X$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-universal-thickening-functorial}
Let $S$ be a scheme
Consider a commutative diagram of algebraic spaces over $S$
$$
\xymatrix{
Z \ar[r]_h \ar[d]_f & X \ar[d]^g \\
W \ar[r]^{h'} & Y
}
$$
with $h$ and $h'$ formally unramified. Let $Z \subset Z'$ be the universal
first order thickening of $Z$ over $X$. Let $W \subset W'$ be the universal
first order thickening of $W$ over $Y$. There exists a canonical morphism
$(f, f') : (Z, Z') \to (W, W')$ of thickenings over $Y$ which fits into
the following commutative diagram
$$
\xymatrix{
& & & Z' \ar[ld] \ar[d]^{f'} \\
Z \ar[rr] \ar[d]_f \ar[rrru] & & X \ar[d] & W' \ar[ld] \\
W \ar[rrru]|!{[rr];[rruu]}\hole \ar[rr] & & Y
}
$$
In particular the morphism $(f, f')$ of thickenings induces a morphism
of conormal sheaves $f^*\mathcal{C}_{W/Y} \to \mathcal{C}_{Z/X}$.
\end{lemma}

\begin{proof}
The first assertion is clear from the universal property of $W'$.
The induced map on conormal sheaves is the map of
Lemma \ref{lemma-conormal-functorial}
applied to $(Z \subset Z') \to (W \subset W')$.
\end{proof}

\begin{lemma}
\label{lemma-universal-thickening-fibre-product}
Let $S$ be a scheme. Let
$$
\xymatrix{
Z \ar[r]_h \ar[d]_f & X \ar[d]^g \\
W \ar[r]^{h'} & Y
}
$$
be a fibre product diagram of algebraic spaces over $S$ with
$h'$ formally unramified. Then $h$ is formally unramified and if
$W \subset W'$ is the universal first order thickening of $W$ over $Y$,
then $Z = X \times_Y W \subset X \times_Y W'$ is the universal
first order thickening of $Z$ over $X$. In particular the canonical map
$f^*\mathcal{C}_{W/Y} \to \mathcal{C}_{Z/X}$ of
Lemma \ref{lemma-universal-thickening-functorial}
is surjective.
\end{lemma}

\begin{proof}
The morphism $h$ is formally unramified by
Lemma \ref{lemma-base-change-formally-unramified}.
It is clear that $X \times_Y W'$ is a first order thickening.
It is straightforward to check that it has the universal property
because $W'$ has the universal property (by mapping properties of
fibre products). See
Lemma \ref{lemma-conormal-functorial-flat}
for why this implies that the map of conormal sheaves is surjective.
\end{proof}

\begin{lemma}
\label{lemma-universal-thickening-fibre-product-flat}
Let $S$ be a scheme. Let
$$
\xymatrix{
Z \ar[r]_h \ar[d]_f & X \ar[d]^g \\
W \ar[r]^{h'} & Y
}
$$
be a fibre product diagram of algebraic spaces over $S$ with
$h'$ formally unramified and $g$ flat. In this case the corresponding
map $Z' \to W'$ of universal first order thickenings is flat, and
$f^*\mathcal{C}_{W/Y} \to \mathcal{C}_{Z/X}$ is an isomorphism.
\end{lemma}

\begin{proof}
Flatness is preserved under base change, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-flat}.
Hence the first statement follows from the description of $W'$ in
Lemma \ref{lemma-universal-thickening-fibre-product}.
It is clear that $X \times_Y W'$ is a first order thickening.
It is straightforward to check that it has the universal property
because $W'$ has the universal property (by mapping properties of
fibre products). See
Lemma \ref{lemma-conormal-functorial-flat}
for why this implies that the map of conormal sheaves is an isomorphism.
\end{proof}

\begin{lemma}
\label{lemma-universal-thickening-localize}
Taking the universal first order thickenings commutes with \'etale
localization. More precisely, let $h : Z \to X$ be a formally unramified
morphism of algebraic spaces over a base scheme $S$.
Let
$$
\xymatrix{
V \ar[d] \ar[r] & U \ar[d] \\
Z \ar[r] & X
}
$$
be a commutative diagram with \'etale vertical arrows.
Let $Z'$ be the universal first order thickening of $Z$ over $X$.
Then $V \to U$ is formally unramified and the universal first
order thickening $V'$ of $V$ over $U$ is \'etale over $Z'$.
In particular, $\mathcal{C}_{Z/X}|_V = \mathcal{C}_{V/U}$.
\end{lemma}

\begin{proof}
The first statement is
Lemma \ref{lemma-formally-unramified}.
The compatibility of universal first order thickenings is
a consequence of
Lemmas \ref{lemma-universal-thickening-over-formally-etale} and
\ref{lemma-etale-morphism-of-universal-thickenings}.
\end{proof}

\begin{lemma}
\label{lemma-differentials-universally-unramified}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $h : Z \to X$ be a formally unramified morphism of algebraic spaces
over $B$. Let $Z \subset Z'$ be the universal first order thickening of $Z$
over $X$ with structure morphism $h' : Z' \to X$. The canonical map
$$
\text{d}h' : (h')^*\Omega_{X/B} \to \Omega_{Z'/B}
$$
induces an isomorphism
$h^*\Omega_{X/B} \to \Omega_{Z'/B} \otimes \mathcal{O}_Z$.
\end{lemma}

\begin{proof}
The map $c_{h'}$ is the map defined in
Lemma \ref{lemma-functoriality-differentials}.
If $i : Z \to Z'$ is the given closed immersion, then
$i^*c_{h'}$ is a map
$h^*\Omega_{X/S} \to \Omega_{Z'/S} \otimes \mathcal{O}_Z$.
Checking that it is an isomorphism reduces to the case of schemes
by \'etale localization, see
Lemma \ref{lemma-universal-thickening-localize}
and
Lemma \ref{lemma-localize-differentials}.
In this case the result is
More on Morphisms,
Lemma \ref{more-morphisms-lemma-differentials-universally-unramified}.
\end{proof}

\begin{lemma}
\label{lemma-universally-unramified-differentials-sequence}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $h : Z \to X$ be a formally unramified morphism of algebraic
spaces over $B$.
There is a canonical exact sequence
$$
\mathcal{C}_{Z/X} \to h^*\Omega_{X/B} \to \Omega_{Z/B} \to 0.
$$
The first arrow is induced by $\text{d}_{Z'/B}$ where
$Z'$ is the universal first order neighbourhood of $Z$ over $X$.
\end{lemma}

\begin{proof}
We know that there is a canonical exact sequence
$$
\mathcal{C}_{Z/Z'} \to
\Omega_{Z'/S} \otimes \mathcal{O}_Z \to
\Omega_{Z/S} \to 0.
$$
see
Lemma \ref{lemma-differentials-relative-immersion}.
Hence the result follows on applying
Lemma \ref{lemma-differentials-universally-unramified}.
\end{proof}

\begin{lemma}
\label{lemma-two-unramified-morphisms}
Let $S$ be a scheme. Let
$$
\xymatrix{
Z \ar[r]_i \ar[rd]_j & X \ar[d] \\
& Y
}
$$
be a commutative diagram of algebraic spaces over $S$
where $i$ and $j$ are formally unramified. Then there is a
canonical exact sequence
$$
\mathcal{C}_{Z/Y} \to
\mathcal{C}_{Z/X} \to
i^*\Omega_{X/Y} \to 0
$$
where the first arrow comes from
Lemma \ref{lemma-universal-thickening-functorial}
and the second from
Lemma \ref{lemma-universally-unramified-differentials-sequence}.
\end{lemma}

\begin{proof}
Since the maps have been defined, checking the sequence is exact
reduces to the case of schemes by \'etale localization, see
Lemma \ref{lemma-universal-thickening-localize}
and
Lemma \ref{lemma-localize-differentials}.
In this case the result is
More on Morphisms,
Lemma \ref{more-morphisms-lemma-two-unramified-morphisms}.
\end{proof}

\begin{lemma}
\label{lemma-transitivity-conormal-unramified}
Let $S$ be a scheme.
Let $Z \to Y \to X$ be formally unramified morphisms of
algebraic spaces over $S$.
\begin{enumerate}
\item If $Z \subset Z'$ is the universal first order thickening of $Z$
over $X$ and $Y \subset Y'$ is the universal first order thickening of $Y$
over $X$, then there is a morphism $Z' \to Y'$ and $Y \times_{Y'} Z'$ is
the universal first order thickening of $Z$ over $Y$.
\item There is a canonical exact sequence
$$
i^*\mathcal{C}_{Y/X} \to
\mathcal{C}_{Z/X} \to
\mathcal{C}_{Z/Y} \to 0
$$
where the maps come from
Lemma \ref{lemma-universal-thickening-functorial}
and $i : Z \to Y$ is the first morphism.
\end{enumerate}
\end{lemma}

\begin{proof}
The map $h : Z' \to Y'$ in (1) comes from
Lemma \ref{lemma-universal-thickening-functorial}.
The assertion that $Y \times_{Y'} Z'$ is the universal first order
thickening of $Z$ over $Y$ is clear from the universal properties
of $Z'$ and $Y'$. By
Lemma \ref{lemma-transitivity-conormal}
we have an exact sequence
$$
(i')^*\mathcal{C}_{Y \times_{Y'} Z'/Z'} \to
\mathcal{C}_{Z/Z'} \to
\mathcal{C}_{Z/Y \times_{Y'} Z'} \to 0
$$
where $i' : Z \to Y \times_{Y'} Z'$ is the given morphism. By
Lemma \ref{lemma-conormal-functorial-flat}
there exists a surjection
$h^*\mathcal{C}_{Y/Y'} \to \mathcal{C}_{Y \times_{Y'} Z'/Z'}$.
Combined with the equalities
$\mathcal{C}_{Y/Y'} = \mathcal{C}_{Y/X}$,
$\mathcal{C}_{Z/Z'} = \mathcal{C}_{Z/X}$, and
$\mathcal{C}_{Z/Y \times_{Y'} Z'} = \mathcal{C}_{Z/Y}$
this proves the lemma.
\end{proof}













\section{Formally \'etale morphisms}
\label{section-formally-etale}

\noindent
In this section we work out what it means that a morphism of algebraic spaces
is formally \'etale.

\begin{definition}
\label{definition-formally-etale}
Let $S$ be a scheme. A morphism $f : X \to Y$ of algebraic spaces over $S$
is said to be {\it formally \'etale} if it is formally \'etale as a
transformation of functors as in
Definition \ref{definition-formally-smooth-etale-unramified}.
\end{definition}

\noindent
We will not restate the results proved in the more general setting of
formally \'etale transformations of functors in
Section \ref{section-formally-smooth-etale-unramified}.

\begin{lemma}
\label{lemma-formally-etale}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces over
$S$. The following are equivalent:
\begin{enumerate}
\item $f$ is formally \'etale,
\item for every diagram
$$
\xymatrix{
U \ar[d] \ar[r]_\psi & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$ and $V$ are schemes and the vertical arrows are \'etale
the morphism of schemes $\psi$ is formally \'etale (as in
More on Morphisms,
Definition \ref{more-morphisms-definition-formally-etale}), and
\item for one such diagram with surjective vertical arrows the morphism
$\psi$ is formally \'etale.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $f$ is formally \'etale. By
Lemma \ref{lemma-representable-property-formally-property}
the morphisms $U \to X$ and $V \to Y$ are formally \'etale. Thus by
Lemma \ref{lemma-composition-formally-smooth-etale-unramified}
the composition $U \to Y$ is formally \'etale. Then it follows from
Lemma \ref{lemma-formally-permanence}
that $U \to V$ is formally \'etale. Thus (1) implies (2). And (2)
implies (3) trivially

\medskip\noindent
Assume given a diagram as in (3). By
Lemma \ref{lemma-representable-property-formally-property}
the morphism $V \to Y$ is formally \'etale. Thus by
Lemma \ref{lemma-composition-formally-smooth-etale-unramified}
the composition $U \to Y$ is formally \'etale. Then it follows from
Lemma \ref{lemma-etale-on-top}
that $X \to Y$ is formally \'etale, i.e., (1) holds.
\end{proof}

\begin{lemma}
\label{lemma-formally-etale-not-affine}
Let $S$ be a scheme.
Let $f : X \to Y$ be a formally \'etale morphism of algebraic spaces over $S$.
Then given any solid commutative diagram
$$
\xymatrix{
X \ar[d]_f & T \ar[d]^i \ar[l]_a \\
Y & T' \ar[l] \ar@{-->}[lu]
}
$$
where $T \subset T'$ is a first order thickening of algebraic spaces
over $Y$ there exists exactly one dotted arrow making the diagram commute.
In other words, in
Definition \ref{definition-formally-etale}
the condition that $T$ be affine may be dropped.
\end{lemma}

\begin{proof}
Let $U' \to T'$ be a surjective \'etale morphism where $U' = \coprod U'_i$
is a disjoint union of affine schemes. Let
$U_i = T \times_{T'} U'_i$. Then we get morphisms
$a'_i : U'_i \to X$ such that $a'_i|_{U_i}$ equals the composition
$U_i \to T \to X$. By uniqueness (see
Lemma \ref{lemma-formally-unramified-not-affine})
we see that $a'_i$ and $a'_j$ agree on the fibre product
$U'_i \times_{T'} U'_j$. Hence $\coprod a'_i : U' \to X$
descends to give a unique morphism $a' : T' \to X$.
\end{proof}

\begin{lemma}
\label{lemma-composition-formally-etale}
A composition of formally \'etale morphisms is formally \'etale.
\end{lemma}

\begin{proof}
This is formal.
\end{proof}

\begin{lemma}
\label{lemma-base-change-formally-etale}
A base change of a formally \'etale morphism is formally \'etale.
\end{lemma}

\begin{proof}
This is formal.
\end{proof}

\begin{lemma}
\label{lemma-characterize-formally-etale}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
The following are equivalent:
\begin{enumerate}
\item $f$ is formally \'etale,
\item $f$ is formally unramified and the universal first order thickening
of $X$ over $Y$ is equal to $X$,
\item $f$ is formally unramified and $\mathcal{C}_{X/Y} = 0$, and
\item $\Omega_{X/Y} = 0$ and $\mathcal{C}_{X/Y} = 0$.
\end{enumerate}
\end{lemma}

\begin{proof}
Actually, the last assertion only make sense because $\Omega_{X/Y} = 0$
implies that $\mathcal{C}_{X/Y}$ is defined via
Lemma \ref{lemma-characterize-formally-unramified}
and
Definition \ref{definition-universal-thickening}.
This also makes it clear that (3) and (4) are equivalent.

\medskip\noindent
Either of the assumptions (1), (2), and (3) imply that $f$ is formally
unramified. Hence we may assume $f$ is formally unramified. The equivalence
of (1), (2), and (3) follow from the universal property of the universal
first order thickening $X'$ of $X$ over $S$ and the fact that
$X = X' \Leftrightarrow \mathcal{C}_{X/Y} = 0$ since
after all by definition $\mathcal{C}_{X/Y} = \mathcal{C}_{X/X'}$
is the ideal sheaf of $X$ in $X'$.
\end{proof}

\begin{lemma}
\label{lemma-unramified-flat-formally-etale}
An unramified flat morphism is formally \'etale.
\end{lemma}

\begin{proof}
Follows from the case of schemes, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-unramified-flat-formally-etale}
and \'etale localization, see
Lemmas \ref{lemma-formally-unramified} and \ref{lemma-formally-etale}
and
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-local}.
\end{proof}

\begin{lemma}
\label{lemma-etale-formally-etale}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The following are equivalent:
\begin{enumerate}
\item The morphism $f$ is \'etale, and
\item the morphism $f$ is locally of finite presentation and
formally \'etale.
\end{enumerate}
\end{lemma}

\begin{proof}
Follows from the case of schemes, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-etale-formally-etale}
and \'etale localization, see
Lemma \ref{lemma-formally-etale}
and
Morphisms of Spaces,
Lemmas \ref{spaces-morphisms-lemma-finite-presentation-local} and
\ref{spaces-morphisms-lemma-etale-local}.
\end{proof}















\section{Infinitesimal deformations of maps}
\label{section-action-by-derivations}

\noindent
In this section we explain how a derivation can be used to
infinitesimally move a map. Throughout this section we use that
a sheaf on a thickening $X'$ of $X$ can be seen as a sheaf on $X$, see
Equations (\ref{equation-equivalence-etale-spaces}) and
(\ref{equation-fundamental-equivalence}).

\begin{lemma}
\label{lemma-difference-derivation}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $X \subset X'$ and $Y \subset Y'$ be two first order thickenings
of algebraic spaces over $B$.
Let $(a, a'), (b, b') : (X \subset X') \to (Y \subset Y')$
be two morphisms of thickenings over $B$. Assume that
\begin{enumerate}
\item $a = b$, and
\item the two maps $a^*\mathcal{C}_{Y/Y'} \to \mathcal{C}_{X/X'}$
(Lemma \ref{lemma-conormal-functorial})
are equal.
\end{enumerate}
Then the map $(a')^\sharp - (b')^\sharp$ factors as
$$
\mathcal{O}_{Y'} \to \mathcal{O}_Y \xrightarrow{D}
a_*\mathcal{C}_{X/X'} \to a_*\mathcal{O}_{X'}
$$
where $D$ is an $\mathcal{O}_B$-derivation.
\end{lemma}

\begin{proof}
Instead of working on $Y$ we work on $X$. The advantage is that the pullback
functor $a^{-1}$ is exact. Using (1) and (2) we obtain a commutative diagram
with exact rows
$$
\xymatrix{
0 \ar[r] &
\mathcal{C}_{X/X'} \ar[r] &
\mathcal{O}_{X'} \ar[r] &
\mathcal{O}_X \ar[r] & 0 \\
0 \ar[r] &
a^{-1}\mathcal{C}_{Y/Y'} \ar[r] \ar[u] &
a^{-1}\mathcal{O}_{Y'}
\ar[r] \ar@<1ex>[u]^{(a')^\sharp} \ar@<-1ex>[u]_{(b')^\sharp} &
a^{-1}\mathcal{O}_Y \ar[r] \ar[u] & 0
}
$$
Now it is a general fact that in such a situation the difference of the
$\mathcal{O}_B$-algebra maps $(a')^\sharp$ and $(b')^\sharp$ is an
$\mathcal{O}_B$-derivation from $a^{-1}\mathcal{O}_Y$ to $\mathcal{C}_{X/X'}$.
By adjointness of the functors $a^{-1}$ and $a_*$ this is the same
thing as an $\mathcal{O}_B$-derivation from
$\mathcal{O}_Y$ into $a_*\mathcal{C}_{X/X'}$. Some details omitted.
\end{proof}

\noindent
Note that in the situation of the lemma above we may write
$D$ as
\begin{equation}
\label{equation-D}
D = \text{d}_{Y/B} \circ \theta
\end{equation}
where $\theta$ is an $\mathcal{O}_Y$-linear map
$\theta : \Omega_{Y/B} \to a_*\mathcal{C}_{X/X'}$.
Of course, then by adjunction again we may view $\theta$ as an
$\mathcal{O}_X$-linear map
$\theta : a^*\Omega_{Y/B} \to \mathcal{C}_{X/X'}$.

\begin{lemma}
\label{lemma-action-by-derivations}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $(a, a') : (X \subset X') \to (Y \subset Y')$
be a morphism of first order thickenings over $B$.
Let
$$
\theta : a^*\Omega_{Y/B} \to \mathcal{C}_{X/X'}
$$
be an $\mathcal{O}_X$-linear map. Then there exists a unique morphism of pairs
$(b, b') : (X \subset X') \to (Y \subset Y')$ such that
(1) and (2) of
Lemma \ref{lemma-difference-derivation}
hold and the derivation $D$ and $\theta$ are related by
Equation (\ref{equation-D}).
\end{lemma}

\begin{proof}
Consider the map
$$
\alpha = (a')^\sharp + D : a^{-1}\mathcal{O}_{Y'} \to \mathcal{O}_{X'}
$$
where $D$ is as in Equation (\ref{equation-D}). As $D$ is an
$\mathcal{O}_B$-derivation it follows that $\alpha$ is a map of
sheaves of $\mathcal{O}_B$-algebras. By construction we have
$i_X^\sharp \circ \alpha = a^\sharp \circ i_Y^\sharp$ where
$i_X : X \to X'$ and $i_Y : Y \to Y'$ are the given closed immersions. By
Lemma \ref{lemma-first-order-thickening-maps}
we obtain a unique morphism
$(a, b') : (X  \subset X') \to (Y \subset Y')$ of thickenings
over $B$ such that $\alpha = (b')^\sharp$. Setting $b = a$
we win.
\end{proof}

\begin{remark}
\label{remark-action-by-derivations}
Assumptions and notation as in Lemma \ref{lemma-action-by-derivations}.
The action of a local section $\theta$ on $a'$ is sometimes indicated by
$\theta \cdot a'$. Note that this means nothing else than the fact
that $(a')^\sharp$ and $(\theta \cdot a')^\sharp$ differ by a derivation
$D$ which is related to $\theta$ by Equation (\ref{equation-D}).
\end{remark}

\begin{lemma}
\label{lemma-sheaf}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $X \subset X'$ and $Y \subset Y'$ be first order thickenings
over $B$. Assume given a morphism $a : X \to Y$ and a map
$A : a^*\mathcal{C}_{Y/Y'} \to \mathcal{C}_{X/X'}$ of
$\mathcal{O}_X$-modules. For an object $U'$ of
$(X')_{spaces, \etale}$ with $U = X \times_{X'} U'$
consider morphisms $a' : U' \to Y'$ such that
\begin{enumerate}
\item $a'$ is a morphism over $B$,
\item $a'|_U = a|_U$, and
\item the induced map
$a^*\mathcal{C}_{Y/Y'}|_U \to \mathcal{C}_{X/X'}|_U$
is the restriction of $A$ to $U$.
\end{enumerate}
Then the rule
\begin{equation}
\label{equation-sheaf}
U' \mapsto
\{a' : U' \to Y'\text{ such that (1), (2), (3) hold.}\}
\end{equation}
defines a sheaf of sets on $(X')_{spaces, \etale}$.
\end{lemma}

\begin{proof}
Denote $\mathcal{F}$ the rule of the lemma.
The restriction mapping $\mathcal{F}(U') \to \mathcal{F}(V')$ for
$V' \subset U' \subset X'$
of $\mathcal{F}$ is really the restriction map $a' \mapsto a'|_{V'}$.
With this definition in place it is clear that $\mathcal{F}$ is a
sheaf since morphisms of algebraic spaces satisfy \'etale descent, see
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-fpqc-universal-effective-epimorphisms}.
\end{proof}

\begin{lemma}
\label{lemma-action-sheaf}
Same notation and assumptions as in Lemma \ref{lemma-sheaf}.
We identify sheaves on $X$ and $X'$ via
(\ref{equation-equivalence-etale-spaces}).
There is an action of the sheaf
$$
\SheafHom_{\mathcal{O}_X}(a^*\Omega_{Y/B}, \mathcal{C}_{X/X'})
$$
on the sheaf (\ref{equation-sheaf}). Moreover, the action
is simply transitive for any object $U'$ of $(X')_{spaces, \etale}$
over which the sheaf (\ref{equation-sheaf}) has a section.
\end{lemma}

\begin{proof}
This is a combination of
Lemmas \ref{lemma-difference-derivation},
\ref{lemma-action-by-derivations},
and \ref{lemma-sheaf}.
\end{proof}

\begin{remark}
\label{remark-special-case}
A special case of
Lemmas \ref{lemma-difference-derivation},
\ref{lemma-action-by-derivations},
\ref{lemma-sheaf}, and
\ref{lemma-action-sheaf}
is where $Y = Y'$. In this case the map $A$ is always zero.
The sheaf of
Lemma \ref{lemma-sheaf}
is just given by the rule
$$
U' \mapsto
\{a' : U' \to Y\text{ over }B\text{ with } a'|_U = a|_U\}
$$
and we act on this by the sheaf
$\SheafHom_{\mathcal{O}_X}(a^*\Omega_{Y/B}, \mathcal{C}_{X/X'})$.
\end{remark}

\begin{remark}
\label{remark-another-special-case}
Another special case of
Lemmas \ref{lemma-difference-derivation},
\ref{lemma-action-by-derivations},
\ref{lemma-sheaf}, and
\ref{lemma-action-sheaf}
is where $B$ itself is a thickening $Z \subset Z' = B$
and $Y = Z \times_{Z'} Y'$. Picture
$$
\xymatrix{
(X \subset X') \ar@{..>}[rr]_{(a, ?)} \ar[rd]_{(g, g')} & &
(Y \subset Y') \ar[ld]^{(h, h')} \\
& (Z \subset Z')
}
$$
In this case the map $A : a^*\mathcal{C}_{Y/Y'} \to \mathcal{C}_{X/X'}$
is determined by $a$: the map
$h^*\mathcal{C}_{Z/Z'} \to \mathcal{C}_{Y/Y'}$ is surjective (because we
assumed $Y = Z \times_{Z'} Y'$), hence the pullback
$g^*\mathcal{C}_{Z/Z'} = a^*h^*\mathcal{C}_{Z/Z'} \to
a^*\mathcal{C}_{Y/Y'}$ is surjective, and the composition
$g^*\mathcal{C}_{Z/Z'} \to a^*\mathcal{C}_{Y/Y'} \to \mathcal{C}_{X/X'}$
has to be the canonical map induced by $g'$. Thus the sheaf of
Lemma \ref{lemma-sheaf}
is just given by the rule
$$
U' \mapsto
\{a' : U' \to Y'\text{ over }Z'\text{ with } a'|_U = a|_U\}
$$
and we act on this by the sheaf
$\SheafHom_{\mathcal{O}_X}(a^*\Omega_{Y/Z}, \mathcal{C}_{X/X'})$.
\end{remark}

\begin{lemma}
\label{lemma-action-by-derivations-etale-localization}
Let $S$ be a scheme. Consider a commutative diagram of first order
thickenings
$$
\vcenter{
\xymatrix{
(T_2 \subset T_2') \ar[d]_{(h, h')} \ar[rr]_{(a_2, a_2')} & &
(X_2 \subset X_2') \ar[d]^{(f, f')} \\
(T_1 \subset T_1') \ar[rr]^{(a_1, a_1')} & &
(X_1 \subset X_1')
}
}
\quad
\begin{matrix}
\text{and a commutative} \\
\text{diagram}
\end{matrix}
\quad
\vcenter{
\xymatrix{
X_2' \ar[r] \ar[d] & B_2 \ar[d] \\
X_1' \ar[r] & B_1
}
}
$$
of algebraic spaces over $S$
with $X_2 \to X_1$ and $B_2 \to B_1$ \'etale.
For any $\mathcal{O}_{T_1}$-linear map
$\theta_1 : a_1^*\Omega_{X_1/B_1} \to \mathcal{C}_{T_1/T'_1}$ let
$\theta_2$ be the composition
$$
\xymatrix{
a_2^*\Omega_{X_2/B_2} \ar@{=}[r] &
h^*a_1^*\Omega_{X_1/B_1} \ar[r]^-{h^*\theta_1} &
h^*\mathcal{C}_{T_1/T'_1} \ar[r] &
\mathcal{C}_{T_2/T'_2}
}
$$
(equality sign is explained in the proof). Then the diagram
$$
\xymatrix{
T_2' \ar[rr]_{\theta_2 \cdot a_2'} \ar[d] & & X'_2 \ar[d] \\
T_1' \ar[rr]^{\theta_1 \cdot a_1'} & & X'_1
}
$$
commutes where the actions $\theta_2 \cdot a_2'$ and $\theta_1 \cdot a_1'$
are as in Remark \ref{remark-action-by-derivations}.
\end{lemma}

\begin{proof}
The equality sign comes from the identification
$f^*\Omega_{X_1/S_1} = \Omega_{X_2/S_2}$ we get
as the construction of the sheaf of differentials is
compatible with \'etale localization (both on source and target), see
Lemma \ref{lemma-localize-differentials}.
Namely, using this we have
$a_2^*\Omega_{X_2/S_2} = a_2^*f^*\Omega_{X_1/S_1} =
h^*a_1^*\Omega_{X_1/S_1}$ because $f \circ a_2 = a_1 \circ h$.
Having said this, the commutativity of the diagram may be checked
on \'etale locally. Thus we may assume $T'_i$, $X'_i$,
$B_2$, and $B_1$ are schemes and in this case the lemma
follows from
More on Morphisms, Lemma
\ref{more-morphisms-lemma-action-by-derivations-etale-localization}.
Alternative proof: using Lemma \ref{lemma-first-order-thickening-maps}
it suffices to show a certain diagram of sheaves
of rings on $X_1'$ is commutative; then argue exactly
as in the proof of the aforementioned
More on Morphisms, Lemma
\ref{more-morphisms-lemma-action-by-derivations-etale-localization}
to see that this is indeed the case.
\end{proof}










\section{Infinitesimal deformations of algebraic spaces}
\label{section-deform}

\noindent
The following simple lemma is often a convenient tool to check whether
an infinitesimal deformation of a map is flat.

\begin{lemma}
\label{lemma-deform}
Let $S$ be a scheme. Let $(f, f') : (X \subset X') \to (Y \subset Y')$ be a
morphism of first order thickenings of algebraic spaces over $S$. Assume that
$f$ is flat. Then the following are equivalent
\begin{enumerate}
\item $f'$ is flat and $X = Y \times_{Y'} X'$, and
\item the canonical map $f^*\mathcal{C}_{Y/Y'} \to \mathcal{C}_{X/X'}$
is an isomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a scheme $V'$ and a surjective \'etale morphism $V' \to Y'$.
Choose a scheme $U'$ and a surjective \'etale morphism
$U' \to X' \times_{Y'} V'$. Set $U = X \times_{X'} U'$ and
$V = Y \times_{Y'} V'$. According to our definition of a flat morphism
of algebraic spaces we see that the induced map $g : U \to V$ is a flat
morphism of schemes and that $f'$ is flat if and only if the corresponding
morphism $g' : U' \to V'$ is flat. Also, $X = Y \times_{Y'} X'$ if and only
if $U = V \times_{V'} V'$. Finally, the map
$f^*\mathcal{C}_{Y/Y'} \to \mathcal{C}_{X/X'}$
is an isomorphism if and only if
$g^*\mathcal{C}_{V/V'} \to \mathcal{C}_{U/U'}$ is an isomorphism.
Hence the lemma follows from its analogue for morphisms of schemes, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-deform}.
\end{proof}

\noindent
The following lemma is the ``nilpotent'' version of the
``crit\`ere de platitude par fibres'', see
Section \ref{section-criterion-flat-fibres}.

\begin{lemma}
\label{lemma-flatness-morphism-thickenings}
Let $S$ be a scheme. Consider a commutative diagram
$$
\xymatrix{
(X \subset X') \ar[rr]_{(f, f')} \ar[rd] & & (Y \subset Y') \ar[ld] \\
& (B \subset B')
}
$$
of thickenings of algebraic spaces over $S$. Assume
\begin{enumerate}
\item $X'$ is flat over $B'$,
\item $f$ is flat,
\item $B \subset B'$ is a finite order thickening, and
\item $X = B \times_{B'} X'$ and $Y = B \times_{B'} Y'$.
\end{enumerate}
Then $f'$ is flat and $Y'$ is flat over $B'$ at all points in
the image of $f'$.
\end{lemma}

\begin{proof}
Choose a scheme $U'$ and a surjective \'etale morphism $U' \to B'$.
Choose a scheme $V'$ and a surjective \'etale morphism
$V' \to U' \times_{B'} Y'$.
Choose a scheme $W'$ and a surjective \'etale morphism
$W' \to V' \times_{Y'} X'$. Let $U, V, W$ be the base change
of $U', V', W'$ by $B \to B'$. Then flatness of $f'$ is
equivalent to flatness of $W' \to V'$ and we are
given that $W \to V$ is flat. Hence we may apply the lemma
in the case of schemes to the diagram
$$
\xymatrix{
(W \subset W') \ar[rr] \ar[rd] & & (V \subset V') \ar[ld] \\
& (U \subset U')
}
$$
of thickenings of schemes. See
More on Morphisms, Lemma
\ref{more-morphisms-lemma-flatness-morphism-thickenings}.
The statement about flatness of $Y'/B'$ at points in the
image of $f'$ follows in the same manner.
\end{proof}

\noindent
Many properties of morphisms of schemes are preserved under flat
deformations.

\begin{lemma}
\label{lemma-deform-property}
Let $S$ be a scheme. Consider a commutative diagram
$$
\xymatrix{
(X \subset X') \ar[rr]_{(f, f')} \ar[rd] & & (Y \subset Y') \ar[ld] \\
& (B \subset B')
}
$$
of thickenings of algebraic spaces over $S$. Assume $B \subset B'$
is a finite order thickening, $X'$ flat over $B'$, $X = B \times_{B'} X'$,
and $Y = B \times_{B'} Y'$. Then
\begin{enumerate}
\item $f$ is representable if and only if $f'$ is representable,
\label{item-representable}
\item $f$ is flat if and only if $f'$ is flat,
\label{item-flat}
\item $f$ is an isomorphism if and only if $f'$ is an isomorphism,
\label{item-isomorphism}
\item $f$ is an open immersion if and only if $f'$ is an open immersion,
\label{item-open-immersion}
\item $f$ is quasi-compact if and only if $f'$ is quasi-compact,
\label{item-quasi-compact}
\item $f$ is universally closed if and only if $f'$ is universally closed,
\label{item-universally-closed}
\item $f$ is (quasi-)separated if and only if $f'$ is (quasi-)separated,
\label{item-separated}
\item $f$ is a monomorphism if and only if $f'$ is a monomorphism,
\label{item-monomorphism}
\item $f$ is surjective if and only if $f'$ is surjective,
\label{item-surjective}
\item $f$ is universally injective if and only if $f'$ is universally injective,
\label{item-universally-injective}
\item $f$ is affine if and only if $f'$ is affine,
\label{item-affine}
\item
\label{item-finite-type}
$f$ is locally of finite type if and only if $f'$ is locally of finite type,
\item $f$ is locally quasi-finite if and only if $f'$ is locally quasi-finite,
\label{item-quasi-finite}
\item
\label{item-finite-presentation}
$f$ is locally of finite presentation if and only if $f'$ is locally of
finite presentation,
\item
\label{item-relative-dimension-d}
$f$ is locally of finite type of relative dimension $d$ if and only if
$f'$ is locally of finite type of relative dimension $d$,
\item $f$ is universally open if and only if $f'$ is universally open,
\label{item-universally-open}
\item $f$ is syntomic if and only if $f'$ is syntomic,
\label{item-syntomic}
\item $f$ is smooth if and only if $f'$ is smooth,
\label{item-smooth}
\item $f$ is unramified if and only if $f'$ is unramified,
\label{item-unramified}
\item $f$ is \'etale if and only if $f'$ is \'etale,
\label{item-etale}
\item $f$ is proper if and only if $f'$ is proper,
\label{item-proper}
\item $f$ is integral if and only if $f'$ is integral,
\label{item-integral}
\item $f$ is finite if and only if $f'$ is finite,
\label{item-finite}
\item
\label{item-finite-locally-free}
$f$ is finite locally free (of rank $d$) if and only if $f'$
is finite locally free (of rank $d$), and
\item add more here.
\end{enumerate}
\end{lemma}

\begin{proof}
Case (\ref{item-representable}) follows from
Lemma \ref{lemma-thicken-property-morphisms}.

\medskip\noindent
Choose a scheme $U'$ and a surjective \'etale morphism $U' \to B'$.
Choose a scheme $V'$ and a surjective \'etale morphism
$V' \to U' \times_{B'} Y'$.
Choose a scheme $W'$ and a surjective \'etale morphism
$W' \to V' \times_{Y'} X'$. Let $U, V, W$ be the base change
of $U', V', W'$ by $B \to B'$. Consider the diagram
$$
\xymatrix{
(W \subset W') \ar[rr] \ar[rd] & & (V \subset V') \ar[ld] \\
& (U \subset U')
}
$$
of thickenings of schemes. For any of the properties which are
\'etale local on the source-and-target the result follows immediately
from the corresponding result for morphisms of thickenings of schemes
applied to the diagram above. Thus cases
(\ref{item-flat}), (\ref{item-finite-type}),
(\ref{item-quasi-finite}), (\ref{item-finite-presentation}),
(\ref{item-relative-dimension-d}), (\ref{item-syntomic}),
(\ref{item-smooth}), (\ref{item-unramified}), (\ref{item-etale})
follow from the corresponding cases of
More on Morphisms, Lemma \ref{more-morphisms-lemma-deform-property}.

\medskip\noindent
Since $X \to X'$ and $Y \to Y'$ are universal homeomorphisms
we see that any question about the topology of the maps
$X \to Y$ and $X' \to Y'$ has the same answer. Thus we see
that cases (\ref{item-quasi-compact}), (\ref{item-universally-closed}),
(\ref{item-surjective}), (\ref{item-universally-injective}), and
(\ref{item-universally-open}) hold.

\medskip\noindent
In each of the remaining cases we only prove the implication
$f\text{ has }P \Rightarrow f'\text{ has }P$ since the other
implication follows from the fact that $P$ is stable under
base change, see
Spaces, Lemma \ref{spaces-lemma-base-change-immersions} and
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-base-change-separated},
\ref{spaces-morphisms-lemma-base-change-monomorphism},
\ref{spaces-morphisms-lemma-base-change-affine},
\ref{spaces-morphisms-lemma-base-change-proper},
\ref{spaces-morphisms-lemma-base-change-integral}, and
\ref{spaces-morphisms-lemma-base-change-finite-locally-free}.

\medskip\noindent
The case (\ref{item-open-immersion}). Assume $f$ is an open immersion.
Then $f'$ is \'etale by (\ref{item-etale}) and universally injective
by (\ref{item-universally-injective})
hence $f'$ is an open immersion, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-etale-universally-injective-open}.
You can avoid using this lemma at the cost of first
using (\ref{item-representable}) to reduce to the case of schemes.

\medskip\noindent
The case (\ref{item-isomorphism}). Follows from cases
(\ref{item-open-immersion}) and (\ref{item-surjective}).

\medskip\noindent
The case (\ref{item-separated}). See
Lemma \ref{lemma-thicken-property-morphisms}.

\medskip\noindent
The case (\ref{item-monomorphism}). Assume $f$ is a monomorphism.
Consider the diagonal morphism $\Delta_{X'/Y'} : X' \to X' \times_{Y'} X'$.
The base change of $\Delta_{X'/Y'}$ by $B \to B'$ is $\Delta_{X/Y}$
which is an isomorphism by assumption. By (\ref{item-isomorphism})
we conclude that $\Delta_{X'/Y'}$ is an isomorphism and hence
$f'$ is a monomorphism.

\medskip\noindent
The case (\ref{item-affine}). See Lemma \ref{lemma-thicken-property-morphisms}.

\medskip\noindent
The case (\ref{item-proper}). See
Lemma \ref{lemma-thicken-property-morphisms-cartesian}.

\medskip\noindent
The case (\ref{item-integral}). See
Lemma \ref{lemma-thicken-property-morphisms}.

\medskip\noindent
The case (\ref{item-finite}). See
Lemma \ref{lemma-thicken-property-morphisms-cartesian}.

\medskip\noindent
The case (\ref{item-finite-locally-free}). Assume $f$ finite locally free.
By (\ref{item-finite}) we see that $f'$ is finite.
By (\ref{item-flat}) we see that $f'$ is flat.
By (\ref{item-finite-presentation}) $f'$ is locally of finite
presentation. Hence $f'$ is finite locally free by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-flat}.
\end{proof}

\noindent
The following lemma is the ``locally nilpotent'' version of the
``crit\`ere de platitude par fibres'', see
Section \ref{section-criterion-flat-fibres}.

\begin{lemma}
\label{lemma-flatness-morphism-thickenings-fp-over-ft}
Let $S$ be a scheme. Consider a commutative diagram
$$
\xymatrix{
(X \subset X') \ar[rr]_{(f, f')} \ar[rd] & & (Y \subset Y') \ar[ld] \\
& (B \subset B')
}
$$
of thickenings of algebraic spaces over $S$. Assume
\begin{enumerate}
\item $Y' \to B'$ is locally of finite type,
\item $X' \to B'$ is flat and locally of finite presentation,
\item $f$ is flat, and
\item $X = B \times_{B'} X'$ and $Y = B \times_{B'} Y'$.
\end{enumerate}
Then $f'$ is flat and for all $y' \in |Y'|$ in the image of $|f'|$
the morphism $Y' \to B'$ is flat at $y'$.
\end{lemma}

\begin{proof}
Choose a scheme $U'$ and a surjective \'etale morphism $U' \to B'$.
Choose a scheme $V'$ and a surjective \'etale morphism
$V' \to U' \times_{B'} Y'$.
Choose a scheme $W'$ and a surjective \'etale morphism
$W' \to V' \times_{Y'} X'$. Let $U, V, W$ be the base change
of $U', V', W'$ by $B \to B'$. Then flatness of $f'$ is
equivalent to flatness of $W' \to V'$ and we are
given that $W \to V$ is flat. Hence we may apply the lemma
in the case of schemes to the diagram
$$
\xymatrix{
(W \subset W') \ar[rr] \ar[rd] & & (V \subset V') \ar[ld] \\
& (U \subset U')
}
$$
of thickenings of schemes. See
More on Morphisms, Lemma
\ref{more-morphisms-lemma-flatness-morphism-thickenings-fp-over-ft}.
The statement about flatness of $Y'/B'$ at points in the
image of $f'$ follows in the same manner.
\end{proof}

\noindent
Many properties of morphisms of schemes are preserved under flat
deformations as in the lemma above.

\begin{lemma}
\label{lemma-deform-property-fp-over-ft}
Let $S$ be a scheme. Consider a commutative diagram
$$
\xymatrix{
(X \subset X') \ar[rr]_{(f, f')} \ar[rd] & & (Y \subset Y') \ar[ld] \\
& (B \subset B')
}
$$
of thickenings of algebraic spaces over $S$.
Assume $Y' \to B'$ locally of finite type,
$X' \to B'$ flat and locally of finite presentation,
$X = B \times_{B'} X'$, and $Y = B \times_{B'} Y'$. Then
\begin{enumerate}
\item $f$ is representable if and only if $f'$ is representable,
\label{item-representable-fp-over-ft}
\item $f$ is flat if and only if $f'$ is flat,
\label{item-flat-fp-over-ft}
\item $f$ is an isomorphism if and only if $f'$ is an isomorphism,
\label{item-isomorphism-fp-over-ft}
\item $f$ is an open immersion if and only if $f'$ is an open immersion,
\label{item-open-immersion-fp-over-ft}
\item $f$ is quasi-compact if and only if $f'$ is quasi-compact,
\label{item-quasi-compact-fp-over-ft}
\item $f$ is universally closed if and only if $f'$ is universally closed,
\label{item-universally-closed-fp-over-ft}
\item $f$ is (quasi-)separated if and only if $f'$ is (quasi-)separated,
\label{item-separated-fp-over-ft}
\item $f$ is a monomorphism if and only if $f'$ is a monomorphism,
\label{item-monomorphism-fp-over-ft}
\item $f$ is surjective if and only if $f'$ is surjective,
\label{item-surjective-fp-over-ft}
\item $f$ is universally injective if and only if $f'$ is universally injective,
\label{item-universally-injective-fp-over-ft}
\item $f$ is affine if and only if $f'$ is affine,
\label{item-affine-fp-over-ft}
\item $f$ is locally quasi-finite if and only if $f'$ is locally quasi-finite,
\label{item-quasi-finite-fp-over-ft}
\item
\label{item-relative-dimension-d-fp-over-ft}
$f$ is locally of finite type of relative dimension $d$ if and only if
$f'$ is locally of finite type of relative dimension $d$,
\item $f$ is universally open if and only if $f'$ is universally open,
\label{item-universally-open-fp-over-ft}
\item $f$ is syntomic if and only if $f'$ is syntomic,
\label{item-syntomic-fp-over-ft}
\item $f$ is smooth if and only if $f'$ is smooth,
\label{item-smooth-fp-over-ft}
\item $f$ is unramified if and only if $f'$ is unramified,
\label{item-unramified-fp-over-ft}
\item $f$ is \'etale if and only if $f'$ is \'etale,
\label{item-etale-fp-over-ft}
\item $f$ is proper if and only if $f'$ is proper,
\label{item-proper-fp-over-ft}
\item $f$ is finite if and only if $f'$ is finite,
\label{item-finite-fp-over-ft}
\item
\label{item-finite-locally-free-fp-over-ft}
$f$ is finite locally free (of rank $d$) if and only if $f'$
is finite locally free (of rank $d$), and
\item add more here.
\end{enumerate}
\end{lemma}

\begin{proof}
Case (\ref{item-representable-fp-over-ft}) follows from
Lemma \ref{lemma-thicken-property-morphisms}.

\medskip\noindent
Choose a scheme $U'$ and a surjective \'etale morphism $U' \to B'$.
Choose a scheme $V'$ and a surjective \'etale morphism
$V' \to U' \times_{B'} Y'$.
Choose a scheme $W'$ and a surjective \'etale morphism
$W' \to V' \times_{Y'} X'$. Let $U, V, W$ be the base change
of $U', V', W'$ by $B \to B'$. Consider the diagram
$$
\xymatrix{
(W \subset W') \ar[rr] \ar[rd] & & (V \subset V') \ar[ld] \\
& (U \subset U')
}
$$
of thickenings of schemes. For any of the properties which are
\'etale local on the source-and-target the result follows immediately
from the corresponding result for morphisms of thickenings of schemes
applied to the diagram above. Thus cases
(\ref{item-flat-fp-over-ft}),
(\ref{item-quasi-finite-fp-over-ft}),
(\ref{item-relative-dimension-d-fp-over-ft}),
(\ref{item-syntomic-fp-over-ft}),
(\ref{item-smooth-fp-over-ft}),
(\ref{item-unramified-fp-over-ft}),
(\ref{item-etale-fp-over-ft})
follow from the corresponding cases of
More on Morphisms, Lemma \ref{more-morphisms-lemma-deform-property-fp-over-ft}.

\medskip\noindent
Since $X \to X'$ and $Y \to Y'$ are universal homeomorphisms
we see that any question about the topology of the maps
$X \to Y$ and $X' \to Y'$ has the same answer. Thus we see
that cases (\ref{item-quasi-compact-fp-over-ft}),
(\ref{item-universally-closed-fp-over-ft}),
(\ref{item-surjective-fp-over-ft}),
(\ref{item-universally-injective-fp-over-ft}), and
(\ref{item-universally-open-fp-over-ft}) hold.

\medskip\noindent
In each of the remaining cases we only prove the implication
$f\text{ has }P \Rightarrow f'\text{ has }P$ since the other
implication follows from the fact that $P$ is stable under
base change, see
Spaces, Lemma \ref{spaces-lemma-base-change-immersions} and
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-base-change-separated},
\ref{spaces-morphisms-lemma-base-change-monomorphism},
\ref{spaces-morphisms-lemma-base-change-affine},
\ref{spaces-morphisms-lemma-base-change-proper},
\ref{spaces-morphisms-lemma-base-change-integral}, and
\ref{spaces-morphisms-lemma-base-change-finite-locally-free}.

\medskip\noindent
The case (\ref{item-open-immersion-fp-over-ft}).
Assume $f$ is an open immersion.
Then $f'$ is \'etale by (\ref{item-etale-fp-over-ft}) and universally injective
by (\ref{item-universally-injective-fp-over-ft})
hence $f'$ is an open immersion, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-etale-universally-injective-open}.
You can avoid using this lemma at the cost of first
using (\ref{item-representable-fp-over-ft}) to reduce to the case of schemes.

\medskip\noindent
The case (\ref{item-isomorphism-fp-over-ft}). Follows from cases
(\ref{item-open-immersion-fp-over-ft}) and (\ref{item-surjective-fp-over-ft}).

\medskip\noindent
The case (\ref{item-separated-fp-over-ft}). See
Lemma \ref{lemma-thicken-property-morphisms}.

\medskip\noindent
The case (\ref{item-monomorphism-fp-over-ft}). Assume $f$ is a monomorphism.
Consider the diagonal morphism $\Delta_{X'/Y'} : X' \to X' \times_{Y'} X'$.
The base change of $\Delta_{X'/Y'}$ by $B \to B'$ is $\Delta_{X/Y}$
which is an isomorphism by assumption. By (\ref{item-isomorphism-fp-over-ft})
we conclude that $\Delta_{X'/Y'}$ is an isomorphism and hence
$f'$ is a monomorphism.

\medskip\noindent
The case (\ref{item-affine-fp-over-ft}).
See Lemma \ref{lemma-thicken-property-morphisms}.

\medskip\noindent
The case (\ref{item-proper-fp-over-ft}). See
Lemma \ref{lemma-properties-that-extend-over-thickenings}.

\medskip\noindent
The case (\ref{item-finite-fp-over-ft}). See
Lemma \ref{lemma-properties-that-extend-over-thickenings}.

\medskip\noindent
The case (\ref{item-finite-locally-free-fp-over-ft}).
Assume $f$ finite locally free.
By (\ref{item-finite-fp-over-ft}) we see that $f'$ is finite.
By (\ref{item-flat-fp-over-ft}) we see that $f'$ is flat.
Also $f'$ is locally finite presentation by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-finite-presentation-permanence}.
Hence $f'$ is finite locally free by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-flat}.
\end{proof}













\section{Formally smooth morphisms}
\label{section-formally-smooth}

\noindent
In this section we introduce the notion of a formally smooth morphism
$X \to Y$ of algebraic spaces. Such a morphism is
characterized by the property that $T$-valued points of $X$ lift
to infinitesimal thickenings of $T$ provided $T$ is affine.
The main result is that a morphism which is formally smooth and
locally of finite presentation is smooth, see
Lemma \ref{lemma-smooth-formally-smooth}.
It turns out that this criterion is often easier to use than the
Jacobian criterion.

\begin{definition}
\label{definition-formally-smooth}
Let $S$ be a scheme. A morphism $f : X \to Y$ of algebraic spaces over $S$
is said to be {\it formally smooth} if it is formally smooth as a
transformation of functors as in
Definition \ref{definition-formally-smooth-etale-unramified}.
\end{definition}

\noindent
In the cases of formally unramified and formally \'etale morphisms
the condition that $T'$ be affine could be dropped, see
Lemmas \ref{lemma-formally-unramified-not-affine} and
\ref{lemma-formally-etale-not-affine}.
This is no longer true in the case of formally smooth morphisms.
In fact, a slightly more natural condition would be that we should be
able to fill in the dotted arrow \'etale locally on $T'$.
In fact, analyzing the proof of
Lemma \ref{lemma-smooth-formally-smooth}
shows that this would be equivalent to the definition as it currently
stands. It is also true that requiring the existence of the dotted
arrow fppf locally on $T'$ would be sufficient, but that is slightly
more difficult to prove.

\medskip\noindent
We will not restate the results proved in the more general setting of
formally smooth transformations of functors in
Section \ref{section-formally-smooth-etale-unramified}.

\begin{lemma}
\label{lemma-composition-formally-smooth}
A composition of formally smooth morphisms is formally smooth.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\begin{lemma}
\label{lemma-base-change-formally-smooth}
A base change of a formally smooth morphism is formally smooth.
\end{lemma}

\begin{proof}
Omitted, but see
Algebra, Lemma \ref{algebra-lemma-base-change-fs}
for the algebraic version.
\end{proof}

\begin{lemma}
\label{lemma-formally-etale-unramified-smooth}
Let $f : X \to S$ be a morphism of schemes.
Then $f$ is formally \'etale if and only if
$f$ is formally smooth and formally unramified.
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
Here is a helper lemma which will be superseded by
Lemma \ref{lemma-formally-smooth}.

\begin{lemma}
\label{lemma-helper-formally-smooth}
Let $S$ be a scheme. Let
$$
\xymatrix{
U \ar[d] \ar[r]_\psi & V \ar[d] \\
X \ar[r]^f & Y
}
$$
be a commutative diagram of morphisms of algebraic spaces over $S$.
If the vertical arrows are \'etale and $f$ is formally smooth, then
$\psi$ is formally smooth.
\end{lemma}

\begin{proof}
By
Lemma \ref{lemma-representable-property-formally-property}
the morphisms $U \to X$ and $V \to Y$ are formally \'etale. By
Lemma \ref{lemma-composition-formally-smooth-etale-unramified}
the composition $U \to Y$ is formally smooth. By
Lemma \ref{lemma-formally-permanence}
we see $\psi : U \to V$ is formally smooth.
\end{proof}

\noindent
The following lemma is the main result of this section.
It implies, combined with
Limits of Spaces, Proposition
\ref{spaces-limits-proposition-characterize-locally-finite-presentation},
that we can recognize whether a morphism of algebraic spaces
$f : X \to Y$ is smooth in terms of ``simple'' properties of the
transformation of functors $X \to Y$.

\begin{lemma}[Infinitesimal lifting criterion]
\label{lemma-smooth-formally-smooth}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The following are equivalent:
\begin{enumerate}
\item The morphism $f$ is smooth.
\item The morphism $f$ is locally of finite presentation, and
formally smooth.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $f : X \to S$ is locally of finite presentation and formally smooth.
Consider a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r]_\psi & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$ and $V$ are schemes and the vertical arrows are \'etale and
surjective. By
Lemma \ref{lemma-helper-formally-smooth}
we see $\psi : U \to V$ is formally smooth. By
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-finite-presentation-local}
the morphism $\psi$ is locally of finite presentation.
Hence by the case of schemes the morphism
$\psi$ is smooth, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-smooth-formally-smooth}.
Hence $f$ is smooth, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-smooth-local}.

\medskip\noindent
Conversely, assume that $f : X \to Y$ is smooth.
Consider a solid commutative diagram
$$
\xymatrix{
X \ar[d]_f & T \ar[d]^i \ar[l]^a \\
Y & T' \ar[l] \ar@{-->}[lu]
}
$$
as in Definition \ref{definition-formally-smooth}. We will show the
dotted arrow exists thereby proving that $f$ is formally smooth.
Let $\mathcal{F}$ be the sheaf of sets on $(T')_{spaces, \etale}$ of
Lemma \ref{lemma-sheaf} as in the special case discussed in
Remark \ref{remark-special-case}. Let
$$
\mathcal{H} =
\SheafHom_{\mathcal{O}_T}(a^*\Omega_{X/Y}, \mathcal{C}_{T/T'})
$$
be the sheaf of $\mathcal{O}_T$-modules on $T_{spaces, \etale}$
with action $\mathcal{H} \times \mathcal{F} \to \mathcal{F}$
as in Lemma \ref{lemma-action-sheaf}.
The action $\mathcal{H} \times \mathcal{F} \to \mathcal{F}$
turns $\mathcal{F}$ into a pseudo $\mathcal{H}$-torsor, see
Cohomology on Sites, Definition \ref{sites-cohomology-definition-torsor}.
Our goal is to show that $\mathcal{F}$ is a trivial $\mathcal{H}$-torsor.
There are two steps: (I) To show that $\mathcal{F}$ is a torsor
we have to show that $\mathcal{F}$ has \'etale locally a
section. (II) To show that $\mathcal{F}$ is the trivial torsor
it suffices to show that $H^1(T_\etale, \mathcal{H}) = 0$, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-torsors-h1}.

\medskip\noindent
First we prove (I). To see this choose a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r]_\psi & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$ and $V$ are schemes and the vertical arrows are \'etale and
surjective. As $f$ is assumed smooth we see that $\psi$ is smooth and
hence formally smooth by
Lemma \ref{lemma-representable-property-formally-property}.
By the same lemma the morphism $V \to Y$ is formally \'etale. Thus by
Lemma \ref{lemma-composition-formally-smooth-etale-unramified}
the composition $U \to Y$ is formally smooth. Then (I) follows from
Lemma \ref{lemma-etale-on-top} part (4).

\medskip\noindent
Finally we prove (II). By
Lemma \ref{lemma-finite-presentation-differentials}
we see that $\Omega_{X/S}$ is of finite presentation.
Hence $a^*\Omega_{X/S}$ is of finite presentation (see
Properties of Spaces,
Section \ref{spaces-properties-section-properties-modules}).
Hence the sheaf
$\mathcal{H} =
\SheafHom_{\mathcal{O}_T}(a^*\Omega_{X/Y}, \mathcal{C}_{T/T'})$
is quasi-coherent by
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-properties-quasi-coherent}.
Thus by
Descent, Proposition \ref{descent-proposition-same-cohomology-quasi-coherent}
and Cohomology of Schemes, Lemma
\ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}
we have
$$
H^1(T_{spaces, \etale}, \mathcal{H}) =
H^1(T_\etale, \mathcal{H}) =
H^1(T, \mathcal{H}) = 0
$$
as desired.
\end{proof}

\noindent
Smooth morphisms satisfy strong local lifting property, see
Lemma \ref{lemma-smooth-strong-lift}. If in the lemma we
assume $T'$ is affine, then
we do not know if it is necessary to take an \'etale covering.
More precisely, if we have a commutative diagram
$$
\xymatrix{
X \ar[d] & T \ar[l] \ar[d] \\
Y & T' \ar[l] \ar@{..>}[lu]
}
$$
of algebraic spaces where $X \to Y$ is smooth
and $T \to T'$ is a thickening of affine schemes,
the does a dotted arrow making the diagram commute
always exist? If you know the answer, or if you have a reference, please email
\href{mailto:stacks.project@gmail.com}{stacks.project@gmail.com}.

\begin{lemma}
\label{lemma-smooth-strong-lift}
Let $S$ be a scheme. Consider a commutative diagram
$$
\xymatrix{
X \ar[d] & T \ar[l] \ar[d] \\
Y & T' \ar[l]
}
$$
of algebraic spaces over $S$ where $X \to Y$ is smooth
and $T \to T'$ is a thickening. Then there exists an
\'etale covering $\{T'_i \to T'\}$ such that we
can find the dotted arrow in
$$
\xymatrix{
X \ar[d] & T \ar[l] \ar[d] & T \times_{T'} T'_i \ar[l] \ar[d] \\
Y & T' \ar[l] & T'_i \ar[l] \ar@{..>}[llu]
}
$$
making the diagram commute (for all $i$).
\end{lemma}

\begin{proof}
Choose an \'etale covering $\{Y_i \to Y\}$ with each $Y_i$ affine.
After replacing $T'$ by the induced \'etale covering we may assume
$Y$ is affine.

\medskip\noindent
Assume $Y$ is affine. Choose an \'etale covering $\{X_i \to X\}$.
This gives rise to an \'etale covering of $T$. This \'etale covering of $T$
comes from an \'etale covering of $T'$
(by Theorem \ref{theorem-topological-invariance}, see
discussion in Section \ref{section-thickenings}).
Hence we may assume $X$ is affine.

\medskip\noindent
Assume $X$ and $Y$ are affine. We can do one more \'etale covering of
$T'$ and assume $T'$ is affine. In this case the lemma follows from
Algebra, Lemma \ref{algebra-lemma-smooth-strong-lift}.
\end{proof}







\noindent
We do a bit more work to show that being formally smooth is \'etale local
on the source. To begin we show that a formally smooth morphism has a nice
sheaf of differentials. The notion of a locally projective quasi-coherent
module is defined in
Properties of Spaces,
Section \ref{spaces-properties-section-locally-projective}.

\begin{lemma}
\label{lemma-formally-smooth-sheaf-differentials}
Let $S$ be a scheme.
Let $f : X \to Y$ be a formally smooth morphism of algebraic spaces over $S$.
Then $\Omega_{X/Y}$ is locally projective on $X$.
\end{lemma}

\begin{proof}
Choose a diagram
$$
\xymatrix{
U \ar[d] \ar[r]_\psi & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$ and $V$ are affine(!) schemes and the vertical arrows are \'etale.
By
Lemma \ref{lemma-helper-formally-smooth}
we see $\psi : U \to V$ is formally smooth. Hence
$\Gamma(V, \mathcal{O}_V) \to \Gamma(U, \mathcal{O}_U)$ is
a formally smooth ring map, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-affine-formally-smooth}.
Hence by
Algebra, Lemma \ref{algebra-lemma-characterize-formally-smooth-again}
the $\Gamma(U, \mathcal{O}_U)$-module
$\Omega_{\Gamma(U, \mathcal{O}_U)/\Gamma(V, \mathcal{O}_V)}$
is projective. Hence $\Omega_{U/V}$ is locally projective, see
Properties, Section \ref{properties-section-locally-projective}.
Since $\Omega_{X/Y}|_U = \Omega_{U/V}$ we see that $\Omega_{X/Y}$ is
locally projective too. (Because we can find an \'etale covering of
$X$ by the affine $U$'s fitting into diagrams as above -- details
omitted.)
\end{proof}

\begin{lemma}
\label{lemma-h1-is-zero}
Let $T$ be an affine scheme.
Let $\mathcal{F}$, $\mathcal{G}$ be quasi-coherent
$\mathcal{O}_T$-modules on $T_\etale$.
Consider the internal hom sheaf
$\mathcal{H} = \SheafHom_{\mathcal{O}_T}(\mathcal{F}, \mathcal{G})$
on $T_\etale$.
If $\mathcal{F}$ is locally projective, then
$H^1(T_\etale, \mathcal{H}) = 0$.
\end{lemma}

\begin{proof}
By the definition of a locally projective sheaf on an algebraic space (see
Properties of Spaces,
Definition \ref{spaces-properties-definition-locally-projective})
we see that $\mathcal{F}_{Zar} = \mathcal{F}|_{T_{Zar}}$ is a locally
projective sheaf on the scheme $T$. Thus $\mathcal{F}_{Zar}$ is a
direct summand of a free $\mathcal{O}_{T_{Zar}}$-module. Whereupon
we conclude (as $\mathcal{F} = (\mathcal{F}_{Zar})^a$, see
Descent, Proposition \ref{descent-proposition-equivalence-quasi-coherent})
that $\mathcal{F}$ is a direct summand of a free $\mathcal{O}_T$-module
on $T_\etale$. Hence we may assume that
$\mathcal{F} = \bigoplus_{i \in I} \mathcal{O}_T$ is a free module.
In this case $\mathcal{H} = \prod_{i \in I} \mathcal{G}$ is
a product of quasi-coherent modules. By
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-cohomology-products}
we conclude that $H^1 = 0$ because the cohomology of a quasi-coherent sheaf
on an affine scheme is zero, see
Descent, Proposition \ref{descent-proposition-same-cohomology-quasi-coherent}
and Cohomology of Schemes, Lemma
\ref{coherent-lemma-quasi-coherent-affine-cohomology-zero}.
\end{proof}

\begin{lemma}
\label{lemma-formally-smooth}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over
$S$. The following are equivalent:
\begin{enumerate}
\item $f$ is formally smooth,
\item for every diagram
$$
\xymatrix{
U \ar[d] \ar[r]_\psi & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$ and $V$ are schemes and the vertical arrows are \'etale
the morphism of schemes $\psi$ is formally smooth (as in
More on Morphisms,
Definition \ref{more-morphisms-definition-formally-unramified}), and
\item for one such diagram with surjective vertical arrows the morphism
$\psi$ is formally smooth.
\end{enumerate}
\end{lemma}

\begin{proof}
We have seen that (1) implies (2) and (3) in
Lemma \ref{lemma-helper-formally-smooth}.
Assume (3).
The proof that $f$ is formally smooth is entirely similar to
the proof of (1) $\Rightarrow$ (2) of
Lemma \ref{lemma-smooth-formally-smooth}.

\medskip\noindent
Consider a solid commutative diagram
$$
\xymatrix{
X \ar[d]_f & T \ar[d]^i \ar[l]^a \\
Y & T' \ar[l] \ar@{-->}[lu]
}
$$
as in Definition \ref{definition-formally-smooth}.
We will show the dotted arrow exists thereby
proving that $f$ is formally smooth.
Let $\mathcal{F}$ be the sheaf of sets on $(T')_{spaces, \etale}$ of
Lemma \ref{lemma-sheaf} as in the special case discussed in
Remark \ref{remark-special-case}.
Let
$$
\mathcal{H} =
\SheafHom_{\mathcal{O}_T}(a^*\Omega_{X/Y}, \mathcal{C}_{T/T'})
$$
be the sheaf of $\mathcal{O}_T$-modules on $T_{spaces, \etale}$
with action $\mathcal{H} \times \mathcal{F} \to \mathcal{F}$ as in
Lemma \ref{lemma-action-sheaf}.
The action $\mathcal{H} \times \mathcal{F} \to \mathcal{F}$
turns $\mathcal{F}$ into a pseudo $\mathcal{H}$-torsor, see
Cohomology on Sites, Definition \ref{sites-cohomology-definition-torsor}.
Our goal is to show that $\mathcal{F}$ is a trivial $\mathcal{H}$-torsor.
There are two steps: (I) To show that $\mathcal{F}$ is a torsor
we have to show that $\mathcal{F}$ has \'etale locally a
section. (II) To show that $\mathcal{F}$ is the trivial torsor
it suffices to show that $H^1(T_\etale, \mathcal{H}) = 0$, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-torsors-h1}.

\medskip\noindent
First we prove (I). To see this consider a diagram
(which exists because we are assuming (3))
$$
\xymatrix{
U \ar[d] \ar[r]_\psi & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$ and $V$ are schemes, the vertical arrows are \'etale and
surjective, and $\psi$ is formally smooth. By
Lemma \ref{lemma-representable-property-formally-property}
the morphism $V \to Y$ is formally \'etale. Thus by
Lemma \ref{lemma-composition-formally-smooth-etale-unramified}
the composition $U \to Y$ is formally smooth. Then (I) follows from
Lemma \ref{lemma-etale-on-top} part (4).

\medskip\noindent
Finally we prove (II). By
Lemma \ref{lemma-formally-smooth-sheaf-differentials}
we see that $\Omega_{U/V}$ locally projective.
Hence $\Omega_{X/Y}$ is locally projective, see
Descent on Spaces,
Lemma \ref{spaces-descent-lemma-locally-projective-descends}.
Hence $a^*\Omega_{X/Y}$ is locally projective, see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-locally-projective-pullback}.
Hence
$$
H^1(T_\etale, \mathcal{H}) =
H^1(T_\etale,
\SheafHom_{\mathcal{O}_T}(a^*\Omega_{X/Y}, \mathcal{C}_{T/T'}) = 0
$$
by
Lemma \ref{lemma-h1-is-zero}
as desired.
\end{proof}

\begin{lemma}
\label{lemma-descending-property-formally-smooth}
The property $\mathcal{P}(f) =$``$f$ is formally smooth''
is fpqc local on the base.
\end{lemma}

\begin{proof}
Let $f : X \to Y$ be a morphism of algebraic spaces over a scheme $S$.
Choose an index set $I$ and diagrams
$$
\xymatrix{
U_i \ar[d] \ar[r]_{\psi_i} & V_i \ar[d] \\
X \ar[r]^f & Y
}
$$
with \'etale vertical arrows and $U_i$, $V_i$ affine schemes. Moreover,
assume that $\coprod U_i \to X$ and $\coprod V_i \to Y$ are surjective, see
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-cover-by-union-affines}.
By
Lemma \ref{lemma-formally-smooth}
we see that $f$ is formally smooth if and only if each of the morphisms
$\psi_i$ are formally smooth. Hence we reduce to the case of a morphism
of affine schemes. In this case the result follows from
Algebra, Lemma \ref{algebra-lemma-descent-formally-smooth}.
Some details omitted.
\end{proof}

\begin{lemma}
\label{lemma-triangle-differentials-formally-smooth}
Let $S$ be a scheme.
Let $f : X \to Y$, $g : Y \to Z$ be morphisms of algebraic spaces over $S$.
Assume $f$ is formally smooth. Then
$$
0 \to f^*\Omega_{Y/Z} \to \Omega_{X/Z} \to \Omega_{X/Y} \to 0
$$
Lemma \ref{lemma-triangle-differentials}
is short exact.
\end{lemma}

\begin{proof}
Follows from the case of schemes, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-triangle-differentials-formally-smooth},
by \'etale localization, see
Lemmas \ref{lemma-formally-smooth} and \ref{lemma-localize-differentials}.
\end{proof}

\begin{lemma}
\label{lemma-differentials-formally-unramified-formally-smooth}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $h : Z \to X$ be a formally unramified morphism of algebraic spaces
over $B$.
Assume that $Z$ is formally smooth over $B$. Then the
canonical exact sequence
$$
0 \to \mathcal{C}_{Z/X} \to h^*\Omega_{X/B} \to \Omega_{Z/B} \to 0
$$
of
Lemma \ref{lemma-universally-unramified-differentials-sequence}
is short exact.
\end{lemma}

\begin{proof}
Let $Z \to Z'$ be the universal first order thickening of $Z$ over $X$.
From the proof of
Lemma \ref{lemma-universally-unramified-differentials-sequence}
we see that our sequence is identified with the sequence
$$
\mathcal{C}_{Z/Z'} \to \Omega_{Z'/B} \otimes \mathcal{O}_Z \to
\Omega_{Z/B} \to 0.
$$
Since $Z \to S$ is formally smooth we can \'etale locally on $Z'$ find
a left inverse $Z' \to Z$ over $B$ to the inclusion map $Z \to Z'$.
Thus the sequence is \'etale locally split, see
Lemma \ref{lemma-differentials-relative-immersion-section}.
\end{proof}

\begin{lemma}
\label{lemma-two-unramified-morphisms-formally-smooth}
Let $S$ be a scheme. Let
$$
\xymatrix{
Z \ar[r]_i \ar[rd]_j & X \ar[d]^f \\
& Y
}
$$
be a commutative diagram of algebraic spaces over $S$
where $i$ and $j$ are formally unramified and $f$ is formally smooth.
Then the canonical exact sequence
$$
0 \to
\mathcal{C}_{Z/Y} \to
\mathcal{C}_{Z/X} \to
i^*\Omega_{X/Y} \to 0
$$
of
Lemma \ref{lemma-two-unramified-morphisms}
is exact and locally split.
\end{lemma}

\begin{proof}
Denote $Z \to Z'$ the universal first order thickening of $Z$ over $X$.
Denote $Z \to Z''$ the universal first order thickening of $Z$ over $Y$.
By
Lemma \ref{lemma-universally-unramified-differentials-sequence}
here is a canonical morphism $Z' \to Z''$ so that we have a commutative
diagram
$$
\xymatrix{
Z \ar[r]_{i'} \ar[rd]_{j'} & Z' \ar[r]_a \ar[d]^k & X \ar[d]^f \\
& Z'' \ar[r]^b & Y
}
$$
The sequence above is identified with the sequence
$$
\mathcal{C}_{Z/Z''} \to
\mathcal{C}_{Z/Z'} \to
(i')^*\Omega_{Z'/Z''} \to 0
$$
via our definitions concerning conormal sheaves of formally unramified
morphisms. Let $U'' \to Z''$ be an \'etale morphism with $U''$ affine.
Denote $U \to Z$ and $U' \to Z'$ the corresponding affine
schemes \'etale over $Z$ and $Z'$.
As $f$ is formally smooth there exists a morphism $h : U'' \to X$
which agrees with $i$ on $U$ and such that $f \circ h$ equals $b|_{U''}$.
Since $Z'$ is the universal first order thickening we obtain a unique
morphism $g : U'' \to Z'$ such that $g = a \circ h$. The universal
property of $Z''$ implies that $k \circ g$ is the inclusion map
$U'' \to Z''$. Hence $g$ is a left inverse to $k$. Picture
$$
\xymatrix{
U \ar[d] \ar[r] & Z' \ar[d]^k \\
U'' \ar[r] \ar[ru]^g & Z''
}
$$
Thus $g$ induces a map $\mathcal{C}_{Z/Z'}|_U \to \mathcal{C}_{Z/Z''}|_U$
which is a left inverse to the map
$\mathcal{C}_{Z/Z''} \to \mathcal{C}_{Z/Z'}$ over $U$.
\end{proof}











\section{Smoothness over a Noetherian base}
\label{section-smooth-Noetherian}

\noindent
This section is the analogue of
More on Morphisms, Section \ref{more-morphisms-section-smooth-Noetherian}.

\begin{lemma}
\label{lemma-lifting-along-artinian-at-point}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Let $x \in |X|$.
Assume that $Y$ is locally Noetherian and $f$ locally of finite type.
The following are equivalent:
\begin{enumerate}
\item $f$ is smooth at $x$,
\item for every solid commutative diagram
$$
\xymatrix{
X \ar[d]_f & \Spec(B) \ar[d]^i \ar[l]^-\alpha \\
Y & \Spec(B') \ar[l]_-{\beta} \ar@{-->}[lu]
}
$$
where $B' \to B$ is a surjection of local rings with
$\Ker(B' \to B)$ of square zero, and $\alpha$ mapping the
closed point of $\Spec(B)$ to $x$ there exists
a dotted arrow making the diagram commute, and
\item same as in (2) but with $B' \to B$ ranging over small
extensions (see Algebra, Definition \ref{algebra-definition-small-extension}).
\end{enumerate}
\end{lemma}

\begin{proof}
Condition (1) means there is an open subspace $X' \subset X$
such that $X' \to Y$ is smooth. Hence (1) implies conditions (2) and (3) by
Lemma \ref{lemma-smooth-formally-smooth}. Condition (2) implies
condition (3) trivially. Assume (3). Choose a commutative diagram
$$
\xymatrix{
X \ar[d] & U \ar[l] \ar[d] \\
Y & V \ar[l]
}
$$
with $U$ and $V$ affine, horizontal arrows \'etale and
such that there is a point $u \in U$ mapping to $x$. Next, consider
a diagram
$$
\xymatrix{
X \ar[d] & U \ar[l] \ar[d] & \Spec(B) \ar[d]^i \ar[l]^-\alpha  \\
Y & V \ar[l] & \Spec(B') \ar[l]_-{\beta}
}
$$
as in (3) but for $u \in U \to V$. Let $\gamma : \Spec(B') \to X$
be the arrow we get from our assumption that (3) holds for $X$.
Because $U \to X$ is \'etale and
hence formally \'etale (Lemma \ref{lemma-etale-formally-etale})
the morphism $\gamma$
has a unique lift to $U$ compatible with $\alpha$. Then because
$V \to Y$ is \'etale hence formally \'etale this lift is compatible
with $\beta$. Hence (3) holds for $u \in U \to V$ and we conclude
that $U \to V$ is smooth at $u$ by
More on Morphisms, Lemma
\ref{more-morphisms-lemma-lifting-along-artinian-at-point}.
This proves that $X \to Y$ is smooth at $x$, thereby
finishing the proof.
\end{proof}

\noindent
Sometimes it is useful to know that one only needs to check the
lifting criterion for small extensions ``centered'' at points
of finite type (see
Morphisms of Spaces, Section \ref{spaces-morphisms-section-points-finite-type}).

\begin{lemma}
\label{lemma-lifting-along-artinian}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume $Y$ is locally Noetherian and $f$ locally of finite type.
The following are equivalent:
\begin{enumerate}
\item $f$ is smooth,
\item for every solid commutative diagram
$$
\xymatrix{
X \ar[d]_f & \Spec(B) \ar[d]^i \ar[l]^-\alpha \\
Y & \Spec(B') \ar[l]_-{\beta} \ar@{-->}[lu]
}
$$
where $B' \to B$ is a small extension of Artinian local rings
and $\beta$ of finite type (!) there exists a dotted arrow making
the diagram commute.
\end{enumerate}
\end{lemma}

\begin{proof}
If $f$ is smooth, then the infinitesimal lifting criterion
(Lemma \ref{lemma-smooth-formally-smooth}) says
$f$ is formally smooth and (2) holds.

\medskip\noindent
Assume $f$ is not smooth. The set of points $x \in X$ where $f$ is not smooth
forms a closed subset $T$ of $|X|$. By
Morphisms of Spaces, Lemma 
\ref{spaces-morphisms-lemma-enough-finite-type-points}, there exists
a point $x \in T \subset X$ with $x \in X_{\text{ft-pts}}$. Choose a
commutative diagram
$$
\xymatrix{
X \ar[d] & U \ar[l] \ar[d] & u \ar@{|->}[d] \\
Y & V \ar[l] & v
}
$$
with $U$ and $V$ affine, horizontal arrows \'etale and
such that there is a point $u \in U$ mapping to $x$. Then $u$
is a finite type point of $U$. Since $U \to V$ is not smooth at
the point $u$, by
More on Morphisms,
Lemma \ref{more-morphisms-lemma-lifting-along-artinian-at-point}
there is a diagram
$$
\xymatrix{
X \ar[d] & U \ar[l] \ar[d] & \Spec(B) \ar[d]^i \ar[l]^-\alpha  \\
Y & V \ar[l] & \Spec(B') \ar[l]_-{\beta} \ar@{-->}[lu]
}
$$
with $B' \to B$ a small extension of (Artinian) local rings
such that the residue field of $B$ is equal to $\kappa(v)$ and such
that the dotted arrow does not exist. Since $U \to V$ is
of finite type, we see that $v$ is a finite type point of $V$. By
Morphisms, Lemma \ref{morphisms-lemma-artinian-finite-type}
the morphism $\beta$ is of finite type, hence the composition
$\Spec(B) \to Y$ is of finite type also.
Arguing exactly as in the proof of
Lemma \ref{lemma-lifting-along-artinian-at-point}
(using that $U \to X$ and $V \to Y$ are \'etale hence
formally \'etale)
we see that there cannot be an arrow $\Spec(B) \to X$
fitting into the outer rectangle of the last displayed diagram.
In other words, (2) doesn't hold and the proof is complete.
\end{proof}

\noindent
Here is a useful application.

\begin{lemma}
\label{lemma-check-smoothness-on-infinitesimal-nbhds}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of
algebraic spaces over $S$. Assume $f$ is
locally of finite type and $Y$ locally Noetherian.
Let $Z \subset Y$ be a closed subspace with $n$th infinitesimal
neighbourhood $Z_n \subset Y$. Set $X_n = Z_n \times_Y X$.
\begin{enumerate}
\item If $X_n \to Z_n$ is smooth for all $n$, then $f$
is smooth at every point of $f^{-1}(Z)$.
\item If $X_n \to Z_n$ is \'etale for all $n$, then $f$
is \'etale at every point of $f^{-1}(Z)$.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume $X_n \to Z_n$ is smooth for all $n$.
Let $x \in X$ be a point lying over a point of $Z$.
Given a small extension $B' \to B$ and morphisms $\alpha$, $\beta$ as in
Lemma \ref{lemma-lifting-along-artinian-at-point} part (3)
the maximal ideal of $B'$ is nilpotent (as $B'$ is Artinian)
and hence the morphism $\beta$ factors through $Z_n$ and $\alpha$ factors
through $X_n$ for a suitable $n$. Thus the lifting property for
$X_n \to Z_n$ kicks in to get the desired dotted arrow in the diagram.
This proves (1). Part (2) follows from (1) and the fact that a morphism
is \'etale if and only if it is smooth of relative dimension $0$.
\end{proof}











\section{The naive cotangent complex}
\label{section-netherlander}

\noindent
This section is the continuation of
Modules on Sites, Section \ref{sites-modules-section-netherlander}
which in turn continues the discussion in
Algebra, Section \ref{algebra-section-netherlander}.

\begin{definition}
\label{definition-netherlander}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The {\it naive cotangent complex of $f$}
is the complex defined in Modules on Sites, Definition
\ref{sites-modules-definition-cotangent-complex-morphism-ringed-topoi}
for the morphism of ringed topoi $f_{small}$ between the
small \'etale sites of $X$ and $Y$, see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-morphism-ringed-topoi}.
Notation: $\NL_f$ or $\NL_{X/Y}$.
\end{definition}

\noindent
The next lemmas show this definition is compatible with the definition
for ring maps and for schemes and that $\NL_{X/Y}$ is an
object of $D_\QCoh(\mathcal{O}_X)$.

\begin{lemma}
\label{lemma-NL-etale-localization}
Let $S$ be a scheme. Consider a commutative diagram
$$
\xymatrix{
U \ar[d]_p \ar[r]_g & V \ar[d]^q \\
X \ar[r]^f & Y
}
$$
of algebraic spaces over $S$ with $p$ and $q$ \'etale.
Then there is a canonical identification
$\NL_{X/Y}|_{U_\etale} = \NL_{U/V}$ in $D(\mathcal{O}_U)$.
\end{lemma}

\begin{proof}
Formation of the naive cotangent complex commutes with pullback
(Modules on Sites, Lemma \ref{sites-modules-lemma-pullback-NL})
and we have $p_{small}^{-1}\mathcal{O}_X = \mathcal{O}_U$ and
$g_{small}^{-1}\mathcal{O}_{V_\etale} =
p_{small}^{-1}f_{small}^{-1}\mathcal{O}_{Y_\etale}$
because $q_{small}^{-1}\mathcal{O}_{Y_\etale} =
\mathcal{O}_{V_\etale}$ by Properties of Spaces, Lemma
\ref{spaces-properties-lemma-etale-exact-pullback}.
Tracing through the definitions we conclude that
$\NL_{X/Y}|_{U_\etale} = \NL_{U/V}$.
\end{proof}

\begin{lemma}
\label{lemma-NL-compare-spaces-schemes}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume $X$ and $Y$ representable by schemes $X_0$ and $Y_0$.
Then there is a canonical identification
$\NL_{X/Y} = \epsilon^*\NL_{X_0/Y_0}$ in $D(\mathcal{O}_X)$
where $\epsilon$ is as in Derived Categories of Spaces, Section
\ref{spaces-perfect-section-derived-quasi-coherent-etale}
and $\NL_{X_0/Y_0}$ is as in
More on Morphisms, Definition
\ref{more-morphisms-definition-netherlander}.
\end{lemma}

\begin{proof}
Let $f_0 : X_0 \to Y_0$ be the morphism of schemes corresponding to $f$.
There is a canonical map
$\epsilon^{-1}f_0^{-1}\mathcal{O}_{Y_0} \to f_{small}^{-1}\mathcal{O}_Y$
compatible with
$\epsilon^\sharp : \epsilon^{-1}\mathcal{O}_{X_0} \to \mathcal{O}_X$
because there is a commutative diagram
$$
\xymatrix{
X_{0, Zar} \ar[d]_{f_0} & X_\etale \ar[l]^\epsilon \ar[d]^f \\
Y_{0, Zar} & Y_\etale \ar[l]_\epsilon
}
$$
see Derived Categories of Spaces, Remark
\ref{spaces-perfect-remark-match-total-direct-images}.
Thus we obtain a canonical map
$$
\epsilon^{-1}\NL_{X_0/Y_0} =
\epsilon^{-1}\NL_{\mathcal{O}_{X_0}/f_0^{-1}\mathcal{O}_{Y_0}} =
\NL_{\epsilon^{-1}\mathcal{O}_{X_0}/\epsilon^{-1}f_0^{-1}\mathcal{O}_{Y_0}}
\to
\NL_{\mathcal{O}_X/f^{-1}_{small}\mathcal{O}_Y} = \NL_{X/Y}
$$
by functoriality of the naive cotangent complex.
To see that the induced map $\epsilon^*\NL_{X_0/Y_0} \to \NL_{X/Y}$ is an
isomorphism in $D(\mathcal{O}_X)$ we may check on stalks at geometric points
(Properties of Spaces, Theorem
\ref{spaces-properties-theorem-exactness-stalks}).
Let $\overline{x} : \Spec(k) \to X_0$
be a geometric point lying over $x \in X_0$, with
$\overline{y} = f \circ \overline{x}$ lying over $y \in Y_0$. Then
$$
\NL_{X/Y, \overline{x}} =
\NL_{\mathcal{O}_{X, \overline{x}}/\mathcal{O}_{Y, \overline{y}}}
$$
This is true because taking stalks at $\overline{x}$ is the same
as taking inverse image via $\overline{x} : \Spec(k) \to X$
and we may apply Modules on Sites, Lemma \ref{sites-modules-lemma-pullback-NL}.
On the other hand we have
$$
(\epsilon^*\NL_{X_0/Y_0})_{\overline{x}} =
\NL_{X_0/Y_0, x} \otimes_{\mathcal{O}_{X_0, x}}
\mathcal{O}_{X, \overline{x}} =
\NL_{\mathcal{O}_{X_0, x}/\mathcal{O}_{Y_0, y}}
\otimes_{\mathcal{O}_{X_0, x}} \mathcal{O}_{X, \overline{x}}
$$
Some details omitted (hint: use that the stalk of a pullback
is the stalk at the image point, see
Sites, Lemma \ref{sites-lemma-point-morphism-sites},
as well as the corresponding result for modules, see
Modules on Sites, Lemma \ref{sites-modules-lemma-pullback-stalk}).
Observe that $\mathcal{O}_{X, \overline{x}}$ is the strict
henselization of $\mathcal{O}_{X_0, x}$ and similarly
for $\mathcal{O}_{Y, \overline{y}}$
(Properties of Spaces, Lemma
\ref{spaces-properties-lemma-describe-etale-local-ring}).
Thus the result follows from
More on Algebra,
Lemma \ref{more-algebra-lemma-henselization-NL}.
\end{proof}

\begin{lemma}
\label{lemma-netherlander-quasi-coherent}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of
algebraic spaces over $S$. The cohomology sheaves
of the complex $\NL_{X/Y}$ are quasi-coherent, zero outside
degrees $-1$, $0$ and equal to $\Omega_{X/Y}$ in degree $0$.
\end{lemma}

\begin{proof}
By construction of the naive cotangent complex in
Modules on Sites, Section \ref{sites-modules-section-netherlander}
we have that $\NL_{X/Y}$ is a complex sitting in degrees $-1$, $0$
and that its cohomology in degree $0$ is $\Omega_{X/Y}$ (by our
construction of $\Omega_{X/Y}$ in Section \ref{section-sheaf-differentials}).
The sheaf of differentials is quasi-coherent (by
Lemma \ref{lemma-module-differentials-quasi-coherent}).
To finish the proof it suffices to show that $H^{-1}(\NL_{X/Y})$
is quasi-coherent. This follows by checking \'etale locally
(allowed by Lemma \ref{lemma-NL-etale-localization} and
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-characterize-quasi-coherent})
reducing to the case of schemes
(Lemma \ref{lemma-NL-compare-spaces-schemes})
and finally using the result in the case of schemes
(More on Morphisms, Lemma
\ref{more-morphisms-lemma-netherlander-quasi-coherent}).
\end{proof}

\begin{lemma}
\label{lemma-netherlander-fp}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
If $f$ is locally of finite
presentation, then $\NL_{X/Y}$ is \'etale locally on $X$
quasi-isomorphic to a complex
$$
\ldots \to 0 \to \mathcal{F}^{-1} \to \mathcal{F}^0 \to 0 \to \ldots
$$
of quasi-coherent $\mathcal{O}_X$-modules
with $\mathcal{F}^0$ of finite presentation
and $\mathcal{F}^{-1}$ of finite type.
\end{lemma}

\begin{proof}
Formation of the naive cotangent complex commutes with \'etale
localization by Lemma \ref{lemma-NL-etale-localization}.
This reduces us to the case of schemes by
Lemma \ref{lemma-NL-compare-spaces-schemes}.
The result in the case of schemes is
More on Morphisms, Lemma
\ref{more-morphisms-lemma-netherlander-fp}.
\end{proof}

\begin{lemma}
\label{lemma-NL-formally-smooth}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The following are equivalent
\begin{enumerate}
\item $f$ is formally smooth,
\item $H^{-1}(\NL_{X/Y}) = 0$ and $H^0(\NL_{X/Y}) = \Omega_{X/Y}$
is locally projective.
\end{enumerate}
\end{lemma}

\begin{proof}
This follows from
Lemma \ref{lemma-formally-smooth},
Lemma \ref{lemma-NL-etale-localization},
Lemma \ref{lemma-NL-compare-spaces-schemes}
and the case of schemes which is
More on Morphisms, Lemma \ref{more-morphisms-lemma-NL-formally-smooth}.
\end{proof}

\begin{lemma}
\label{lemma-NL-formally-etale}
Let $f : X \to Y$ be a morphism of schemes. The following are equivalent
\begin{enumerate}
\item $f$ is formally \'etale,
\item $H^{-1}(\NL_{X/Y}) = H^0(\NL_{X/Y}) = 0$.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1). A formally \'etale morphism is a formally smooth morphism.
Thus $H^{-1}(\NL_{X/Y}) = 0$ by Lemma \ref{lemma-NL-formally-smooth}.
On the other hand, a formally \'etale morphism if formally unramified
hence we have $\Omega_{X/Y} = 0$ by
Lemma \ref{lemma-characterize-formally-unramified}.
Conversely, if (2) holds, then $f$ is formally smooth by
Lemma \ref{lemma-NL-formally-smooth}
and formally unramified by
Lemma \ref{lemma-characterize-formally-unramified}
and hence formally \'etale by
Lemmas \ref{lemma-formally-etale-unramified-smooth}.
\end{proof}

\begin{lemma}
\label{lemma-NL-smooth}
Let $f : X \to Y$ be a morphism of schemes. The following are equivalent
\begin{enumerate}
\item $f$ is smooth, and
\item $f$ is locally of finite presentation,
$H^{-1}(\NL_{X/Y}) = 0$, and $H^0(\NL_{X/Y}) = \Omega_{X/Y}$
is finite locally free.
\end{enumerate}
\end{lemma}

\begin{proof}
This follows from
Lemma \ref{lemma-formally-smooth},
Lemma \ref{lemma-NL-etale-localization},
Lemma \ref{lemma-NL-compare-spaces-schemes}
and the case of schemes which is
More on Morphisms, Lemma \ref{more-morphisms-lemma-NL-smooth}.
\end{proof}











\section{Openness of the flat locus}
\label{section-open-flat}

\noindent
This section is analogue of
More on Morphisms, Section \ref{more-morphisms-section-open-flat}.
Note that we have defined the notion of flatness for quasi-coherent
modules on algebraic spaces in
Morphisms of Spaces, Section \ref{spaces-morphisms-section-flat-modules}.

\begin{theorem}
\label{theorem-openness-flatness}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $\mathcal{F}$ be a quasi-coherent sheaf on $X$.
Assume $f$ is locally of finite presentation and that
$\mathcal{F}$ is an $\mathcal{O}_X$-module which is
locally of finite presentation. Then
$$
\{x \in |X| : \mathcal{F}\text{ is flat over }Y\text{ at }x\}
$$
is open in $|X|$.
\end{theorem}

\begin{proof}
Choose a commutative diagram
$$
\xymatrix{
U \ar[d]_p \ar[r]_\alpha &
V \ar[d]^q \\
X \ar[r]^a & Y
}
$$
with $U$, $V$ schemes and $p$, $q$ surjective and \'etale as in
Spaces, Lemma \ref{spaces-lemma-lift-morphism-presentations}.
By
More on Morphisms, Theorem \ref{more-morphisms-theorem-openness-flatness}
the set
$U' = \{u \in |U| : p^*\mathcal{F}\text{ is flat over }V\text{ at }u\}$
is open in $U$. By
Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-flat-module}
the image of $U'$ in $|X|$ is the set
of the theorem. Hence we are done because the map $|U| \to |X|$ is
open, see
Properties of Spaces, Lemma \ref{spaces-properties-lemma-topology-points}.
\end{proof}

\begin{lemma}
\label{lemma-flat-locus-base-change}
Let $S$ be a scheme. Let
$$
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} & X \ar[d]^f \\
Y' \ar[r]^g & Y
}
$$
be a cartesian diagram of algebraic spaces over $S$.
Let $\mathcal{F}$ be a quasi-coherent $\mathcal{O}_X$-module.
Assume $g$ is flat, $f$ is locally of finite presentation,
and $\mathcal{F}$ is locally of finite presentation.
Then
$$
\{x' \in |X'| : (g')^*\mathcal{F}\text{ is flat over }Y'\text{ at }x'\}
$$
is the inverse image of the open subset of
Theorem \ref{theorem-openness-flatness}
under the continuous map $|g'| : |X'| \to |X|$.
\end{lemma}

\begin{proof}
This follows from
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-base-change-module-flat}.
\end{proof}












\section{Crit\`ere de platitude par fibres}
\label{section-criterion-flat-fibres}

\noindent
Let $S$ be a scheme. Consider a commutative diagram of algebraic spaces
over $S$
$$
\xymatrix{
X \ar[rr]_f \ar[dr]_g & & Y \ar[dl]^h \\
& Z
}
$$
and a quasi-coherent $\mathcal{O}_X$-module $\mathcal{F}$.
Given a point $x \in |X|$ we consider the question as to whether
$\mathcal{F}$ is flat over $Y$ at $x$. If $\mathcal{F}$ is flat
over $Z$ at $x$, then the theorem below states this question is
intimately related to the question of whether the restriction of
$\mathcal{F}$ to the fibre of $X \to Z$ over $g(x)$
is flat over the fibre of $Y \to Z$ over $g(x)$. To make sense
out of this we offer the following preliminary lemma.

\begin{lemma}
\label{lemma-flat-on-fibres-at-point}
In the situation above the following are equivalent
\begin{enumerate}
\item Pick a geometric point $\overline{x}$ of $X$ lying over $x$.
Set $\overline{y} = f \circ \overline{x}$ and
$\overline{z} = g \circ \overline{x}$. Then the module
$\mathcal{F}_{\overline{x}}/
\mathfrak m_{\overline{z}}\mathcal{F}_{\overline{x}}$
is flat over
$\mathcal{O}_{Y, \overline{y}}/
\mathfrak m_{\overline{z}}\mathcal{O}_{Y, \overline{y}}$.
\item Pick a morphism $x : \Spec(K) \to X$ in the equivalence class of
$x$. Set $z = g \circ x$, $X_z = \Spec(K) \times_{z, Z} X$,
$Y_z = \Spec(K) \times_{z, Z} Y$, and $\mathcal{F}_z$ the pullback
of $\mathcal{F}$ to $X_z$. Then $\mathcal{F}_z$ is flat at $x$ over
$Y_z$ (as defined in Morphisms of Spaces,
Definition \ref{spaces-morphisms-definition-flat-module}).
\item Pick a commutative diagram
$$
\xymatrix{
& & & U \ar[llld]_a \ar[rr] \ar[dr] & & V \ar[llld]_>>>>>>>b \ar[dl] \\
X \ar[rr]_f \ar[dr]_g & & Y \ar[dl]^h &  & W \ar[llld]_c \\
& Z
}
$$
where $U, V, W$ are schemes, and $a, b, c$ are \'etale,
and a point $u \in U$ mapping to $x$. Let $w \in W$ be the image of
$u$. Let $\mathcal{F}_w$ be the pullback of $\mathcal{F}$ to
the fibre $U_w$ of $U \to W$ at $w$. Then $\mathcal{F}_w$
is flat over $V_w$ at $u$.
\end{enumerate}
\end{lemma}

\begin{proof}
Note that in (2) the morphism $x : \Spec(K) \to X$ defines a
$K$-rational point of $X_z$, hence the statement makes sense. Moreover,
the condition in (2) is independent of the choice of $\Spec(K) \to X$
in the equivalence class of $x$ (details omitted; this will also follow
from the arguments below because the other conditions do not depend
on this choice). Also note that we can always choose a diagram as in
(3) by: first choosing
a scheme $W$ and a surjective \'etale morphism $W \to Z$, then choosing
a scheme $V$ and a surjective \'etale morphism $V \to W \times_Z Y$, and
finally choosing a scheme $U$ and a surjective \'etale morphism
$U \to V \times_Y X$. Having made these choices we set $U \to W$ equal
to the composition $U \to V \to W$ and we can pick a point $u \in U$ mapping
to $x$ because the morphism $U \to X$ is surjective.

\medskip\noindent
Suppose given both a diagram as in (3) and a geometric point
$\overline{x} : \Spec(k) \to X$ as in (1). By
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-geometric-lift-to-usual}
we can choose a geometric point $\overline{u} : \Spec(k) \to U$
lying over $u$ such that $\overline{x} = a \circ \overline{u}$.
Denote $\overline{v} : \Spec(k) \to V$ and
$\overline{w} : \Spec(k) \to W$ the induced geometric points of
$V$ and $W$. In this setting we know that
$\mathcal{O}_{X, \overline{x}} = \mathcal{O}_{U, u}^{sh}$
and similarly for $Y$ and $Z$, see
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-describe-etale-local-ring}.
In the same vein we have
$$
\mathcal{F}_{\overline{x}} =
(a^*\mathcal{F})_u \otimes_{\mathcal{O}_{U, u}}
\mathcal{O}_{U, u}^{sh}
$$
see
Properties of Spaces, Lemma \ref{spaces-properties-lemma-stalk-quasi-coherent}.
Note that the stalk of $\mathcal{F}_w$ at $u$ is given by
$$
(\mathcal{F}_w)_u = (a^*\mathcal{F})_u/\mathfrak m_w(a^*\mathcal{F})_u
$$
and the local ring of $V_w$ at $v$ is given by
$$
\mathcal{O}_{V_w, v} = \mathcal{O}_{V, v}/\mathfrak m_w\mathcal{O}_{V, v}.
$$
Since $\mathfrak m_{\overline{z}} =
\mathfrak m_w \mathcal{O}_{Z, \overline{z}} =
\mathfrak m_w \mathcal{O}_{W, w}^{sh}$
we see that
\begin{align*}
\mathcal{F}_{\overline{x}}/
\mathfrak m_{\overline{z}}\mathcal{F}_{\overline{x}} & =
(a^*\mathcal{F})_u \otimes_{\mathcal{O}_{U, u}}
\mathcal{O}_{X, \overline{x}}/
\mathfrak m_{\overline{z}}\mathcal{O}_{X, \overline{x}} \\
& =
(\mathcal{F}_w)_u \otimes_{\mathcal{O}_{U_w, u}}
\mathcal{O}_{U, u}^{sh}/\mathfrak m_w\mathcal{O}_{U, u}^{sh} \\
& = (\mathcal{F}_w)_u \otimes_{\mathcal{O}_{U_w, u}}
\mathcal{O}_{U_w, \overline{u}}^{sh} \\
& = (\mathcal{F}_w)_{\overline{u}}
\end{align*}
the penultimate equality by
Algebra, Lemma \ref{algebra-lemma-quotient-strict-henselization}
and the last equality by
Properties of Spaces, Lemma \ref{spaces-properties-lemma-stalk-quasi-coherent}.
The same arguments applied to the structure sheaves of $V$ and $Y$
show that
$$
\mathcal{O}_{V_w, \overline{v}}^{sh} =
\mathcal{O}_{V, v}^{sh}/\mathfrak m_w \mathcal{O}_{V, v}^{sh} =
\mathcal{O}_{Y, \overline{y}}/
\mathfrak m_{\overline{z}}\mathcal{O}_{Y, \overline{y}}.
$$
OK, and now we can use
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-at-point}
to see that (1) is equivalent to (3).

\medskip\noindent
Finally we prove the equivalence of (2) and (3).
To do this we pick a field extension $\tilde K$ of $K$
and a morphism $\tilde x : \Spec(\tilde K) \to U$ which
lies over $u$ (this is possible because $u \times_{X, x} \Spec(K)$
is a nonempty scheme). Set $\tilde z : \Spec(\tilde K) \to U \to W$
be the composition. We obtain a commutative diagram
$$
\xymatrix{
& & & U_w \times_w \tilde z \ar[llld]_a \ar[rr] \ar[dr] & &
V_w \times_w \tilde z \ar[llld]_>>>>>>>b \ar[dl] \\
X_z \ar[rr]_f \ar[dr]_g & & Y_z \ar[dl]^h &  & \tilde z \ar[llld]_c \\
& z
}
$$
where $z = \Spec(K)$ and $w = \Spec(\kappa(w))$. Now it
is clear that $\mathcal{F}_w$ and $\mathcal{F}_z$ pull back to the
same module on $U_w \times_w \tilde z$. This leads to a commutative
diagram
$$
\xymatrix{
X_z \ar[d] & U_w \times_w \tilde z \ar[l] \ar[d] \ar[r] & U_w \ar[d] \\
Y_z & V_w \times_w \tilde z \ar[l] \ar[r] & V_w
}
$$
both of whose squares are cartesian and whose bottom horizontal
arrows are flat: the lower left horizontal arrow is the composition
of the morphism $Y \times_Z \tilde z \to Y \times_Z z = Y_z$ (base change
of a flat morphism), the \'etale morphism
$V \times_Z \tilde z \to Y \times_Z \tilde z$, and
the \'etale morphism $V \times_W \tilde z \to V \times_Z \tilde z$.
Thus it follows from
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-base-change-module-flat}
that
$$
\mathcal{F}_z\text{ flat at }x\text{ over }Y_z
\Leftrightarrow
\mathcal{F}|_{U_w \times_w \tilde z}
\text{ flat at }\tilde x\text{ over }V_w \times_w \tilde z
\Leftrightarrow
\mathcal{F}_w\text{ flat at }u\text{ over }V_w
$$
and we win.
\end{proof}

\begin{definition}
\label{definition-module-flat-on-fibre}
Let $S$ be a scheme. Let $X \to Y \to Z$ be morphisms of algebraic
spaces over $S$. Let $\mathcal{F}$ be a quasi-coherent $\mathcal{O}_X$-module.
Let $x \in |X|$ be a point and denote $z \in |Z|$ its image.
\begin{enumerate}
\item We say {\it the restriction of $\mathcal{F}$ to its fibre over $z$
is flat at $x$ over the fibre of $Y$ over $z$} if the equivalent conditions of
Lemma \ref{lemma-flat-on-fibres-at-point}
are satisfied.
\item We say {\it the fibre of $X$ over $z$ is flat at $x$ over the fibre of
$Y$ over $z$} if the equivalent conditions of
Lemma \ref{lemma-flat-on-fibres-at-point}
hold with $\mathcal{F} = \mathcal{O}_X$.
\item We say {\it the fibre of $X$ over $z$ is flat over the fibre of $Y$
over $z$} if for all $x \in |X|$ lying over $z$ the fibre of $X$ over $z$
is flat at $x$ over the fibre of $Y$ over $z$
\end{enumerate}
\end{definition}

\noindent
With this definition in hand we can state a version of the criterion as
follows. The Noetherian version can be found in
Section \ref{section-flat-over-Noetherian}.

\begin{theorem}
\label{theorem-criterion-flatness-fibre}
Let $S$ be a scheme.
Let $f : X \to Y$ and $Y \to Z$ be morphisms of algebraic spaces over $S$.
Let $\mathcal{F}$ be a quasi-coherent $\mathcal{O}_X$-module.
Assume
\begin{enumerate}
\item $X$ is locally of finite presentation over $Z$,
\item $\mathcal{F}$ an $\mathcal{O}_X$-module of finite presentation, and
\item $Y$ is locally of finite type over $Z$.
\end{enumerate}
Let $x \in |X|$ and let $y \in |Y|$ and $z \in |Z|$ be the images of
$x$. If $\mathcal{F}_{\overline{x}} \not = 0$, then the following are
equivalent:
\begin{enumerate}
\item $\mathcal{F}$ is flat over $Z$ at $x$ and
the restriction of $\mathcal{F}$ to its fibre over $z$
is flat at $x$ over the fibre of $Y$ over $z$, and
\item $Y$ is flat over $Z$ at $y$ and $\mathcal{F}$ is
flat over $Y$ at $x$.
\end{enumerate}
Moreover, the set of points $x$ where (1) and (2) hold is open in
$\text{Supp}(\mathcal{F})$.
\end{theorem}

\begin{proof}
Choose a diagram as in
Lemma \ref{lemma-flat-on-fibres-at-point} part (3).
It follows from the definitions that this reduces to the
corresponding theorem for the morphisms of schemes
$U \to V \to W$, the quasi-coherent sheaf $a^*\mathcal{F}$,
and the point $u \in U$. Thus the theorem follows from the
corresponding result for schemes which is
More on Morphisms,
Theorem \ref{more-morphisms-theorem-criterion-flatness-fibre}.
\end{proof}

\begin{lemma}
\label{lemma-morphism-between-flat}
Let $S$ be a scheme.
Let $f : X \to Y$ and $Y \to Z$ be a morphism of algebraic spaces over $S$.
Assume
\begin{enumerate}
\item $X$ is locally of finite presentation over $Z$,
\item $X$ is flat over $Z$,
\item for every $z \in |Z|$ the fibre of $X$ over $z$
is flat over the fibre of $Y$ over $z$, and
\item $Y$ is locally of finite type over $Z$.
\end{enumerate}
Then $f$ is flat. If $f$ is also surjective, then $Y$ is flat over $Z$.
\end{lemma}

\begin{proof}
This is a special case of
Theorem \ref{theorem-criterion-flatness-fibre}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-criterion-flatness-fibre}
Let $S$ be a scheme. Let $f : X \to Y$ and $Y \to Z$ be morphisms of
algebraic spaces over $S$. Let $\mathcal{F}$ be a quasi-coherent
$\mathcal{O}_X$-module.
Assume
\begin{enumerate}
\item $X$ is locally of finite presentation over $Z$,
\item $\mathcal{F}$ an $\mathcal{O}_X$-module of finite presentation,
\item $\mathcal{F}$ is flat over $Z$, and
\item $Y$ is locally of finite type over $Z$.
\end{enumerate}
Then the set
$$
A = \{x \in |X| : \mathcal{F} \text{ flat at }x \text{ over }Y\}.
$$
is open in $|X|$ and its formation commutes with arbitrary base change:
If $Z' \to Z$ is a morphism of algebraic spaces, and $A'$ is the set of
points of $X' = X \times_Z Z'$ where $\mathcal{F}' = \mathcal{F} \times_Z Z'$
is flat over $Y' = Y \times_Z Z'$, then $A'$ is the inverse image of
$A$ under the continuous map $|X'| \to |X|$.
\end{lemma}

\begin{proof}
One way to prove this is to translate the proof as given in
More on Morphisms, Lemma \ref{more-morphisms-lemma-morphism-between-flat}
into the category of algebraic spaces. Instead we will prove this
by reducing to the case of schemes. Namely, choose a diagram as in
Lemma \ref{lemma-flat-on-fibres-at-point} part (3)
such that $a$, $b$, and $c$ are surjective.
It follows from the definitions that this reduces to the
corresponding theorem for the morphisms of schemes
$U \to V \to W$, the quasi-coherent sheaf $a^*\mathcal{F}$,
and the point $u \in U$. The only minor point to make is that
given a morphism of algebraic spaces $Z' \to Z$ we choose a scheme
$W'$ and a surjective \'etale morphism $W' \to W \times_Z Z'$.
Then we set $U' = W' \times_W U$ and $V' = W' \times_W V$.
We write $a', b', c'$ for the morphisms from $U', V', W'$ to
$X', Y', Z'$. In this case $A$, resp.\ $A'$ are images of the open
subsets of $U$, resp.\ $U'$ associated to
$a^*\mathcal{F}$, resp.\ $(a')^*\mathcal{F}'$.
This indeed does reduce the lemma to
More on Morphisms, Lemma \ref{more-morphisms-lemma-morphism-between-flat}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-flatness-fibres}
Let $S$ be a scheme.
Let $f : X \to Y$ and $Y \to Z$ be a morphism of algebraic spaces over $S$.
Assume
\begin{enumerate}
\item $X$ is locally of finite presentation over $Z$,
\item $X$ is flat over $Z$, and
\item $Y$ is locally of finite type over $Z$.
\end{enumerate}
Then the set
$$
\{x \in |X| : X\text{ flat at }x \text{ over }Y\}.
$$
is open in $|X|$ and its formation commutes with arbitrary base change
$Z' \to Z$.
\end{lemma}

\begin{proof}
This is a special case of
Lemma \ref{lemma-base-change-criterion-flatness-fibre}.
\end{proof}

\begin{lemma}
\label{lemma-flat-and-free-at-point-fibre}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$ which is locally of finite presentation.
Let $\mathcal{F}$ be a finitely presented $\mathcal{O}_X$-module.
Let $x \in |X|$ with image $y \in |Y|$. If $\mathcal{F}$ is flat at $x$
over $Y$, then the following are equivalent
\begin{enumerate}
\item $(\mathcal{F}_{\overline{y}})_{\overline{x}}$ is a flat
$\mathcal{O}_{X_{\overline{y}}, \overline{x}}$-module,
\item $(\mathcal{F}_{\overline{y}})_{\overline{x}}$ is a free
$\mathcal{O}_{X_{\overline{y}}, \overline{x}}$-module,
\item $\mathcal{F}_{\overline{y}}$ is finite free in an
\'etale neighbourhood of $\overline{x}$ in $X_{\overline{y}}$, and
\item $\mathcal{F}$ is finite free in an \'etale neighbourhood of $x$ in $X$.
\end{enumerate}
Here $\overline{x}$ is a geometric point of $X$ lying over $x$
and $\overline{y} = f \circ \overline{x}$.
\end{lemma}

\begin{proof}
Pick a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
where $U$ and $V$ are schemes and the vertical arrows are \'etale
such that there is a point $u \in U$ mapping to $x$. Let $v \in V$
be the image of $u$. Applying Lemma \ref{lemma-flat-on-fibres-at-point}
to $\text{id} : X \to X$ over $Y$ we see that (1) translates into
the condition ``$\mathcal{F}|_{U_v}$ is flat over $U_v$ at $u$''.
In other words, (1) is equivalent to $(\mathcal{F}|_{U_v})_u$
being a flat $\mathcal{O}_{U_v, u}$-module.
By the case of schemes (More on Morphisms, Lemma
\ref{more-morphisms-lemma-flat-and-free-at-point-fibre}),
we find that this implies that
$\mathcal{F}|_U$ is finite free in an open neighbourhood
of $u$. In this way we see that (1) implies (4).
The implications (4) $\Rightarrow$ (3) and
(2) $\Rightarrow$ (1) are immediate.
For the implication (3) $\Rightarrow$ (2) use
the description of local rings and stalks in
Properties of Spaces, Lemmas
\ref{spaces-properties-lemma-describe-etale-local-ring} and
\ref{spaces-properties-lemma-stalk-quasi-coherent}.
\end{proof}

\begin{lemma}
\label{lemma-finite-free-open}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$ which is locally of finite presentation.
Let $\mathcal{F}$ be a finitely presented $\mathcal{O}_X$-module
flat over $Y$. Then the set
$$
\{x \in |X| : \mathcal{F}\text{ free in an \'etale neighbourhood of }x\}
$$
is open in $|X|$ and its formation commutes with arbitrary base change
$Y' \to Y$.
\end{lemma}

\begin{proof}
Openness holds trivially. Let $Y' \to Y$ be a morphism of algebraic spaces,
set $X' = Y' \times_Y X$, 
and let $x' \in |X'|$ be a point lying over $x \in |X|$.
By Lemma \ref{lemma-flat-and-free-at-point-fibre}
we see that $x$ is in our set if and only if
$(\mathcal{F}_{\overline{y}})_{\overline{x}}$ is a flat
$\mathcal{O}_{X_{\overline{y}}, \overline{x}}$-module.
Similarly, $x'$ is in the analogue of our set for the pullback
$\mathcal{F}'$ of $\mathcal{F}$ to $X'$ if and only if
$(\mathcal{F}'_{\overline{y}'})_{\overline{x}'}$ is a flat
$\mathcal{O}_{X'_{\overline{y}'}, \overline{x}'}$-module
(with obvious notation). These two assertions are equivalent
by Lemma \ref{lemma-flat-on-fibres-at-point} applied to
the morphism $\text{id} : X \to X$ over $Y$.
Thus the statement on base change holds.
\end{proof}







\section{Flatness over a Noetherian base}
\label{section-flat-over-Noetherian}

\noindent
Here is the ``Crit\`ere de platitude par fibres'' in the Noetherian case.

\begin{theorem}
\label{theorem-criterion-flatness-fibre-Noetherian}
Let $S$ be a scheme.
Let $f : X \to Y$ and $Y \to Z$ be morphisms of algebraic spaces over $S$.
Let $\mathcal{F}$ be a quasi-coherent $\mathcal{O}_X$-module.
Assume
\begin{enumerate}
\item $X$, $Y$, $Z$ locally Noetherian, and
\item $\mathcal{F}$ a coherent $\mathcal{O}_X$-module.
\end{enumerate}
Let $x \in |X|$ and let $y \in |Y|$ and $z \in |Z|$ be the images of
$x$. If $\mathcal{F}_{\overline{x}} \not = 0$, then the following are
equivalent:
\begin{enumerate}
\item $\mathcal{F}$ is flat over $Z$ at $x$ and
the restriction of $\mathcal{F}$ to its fibre over $z$
is flat at $x$ over the fibre of $Y$ over $z$, and
\item $Y$ is flat over $Z$ at $y$ and $\mathcal{F}$ is
flat over $Y$ at $x$.
\end{enumerate}
\end{theorem}

\begin{proof}
Choose a diagram as in
Lemma \ref{lemma-flat-on-fibres-at-point} part (3).
It follows from the definitions that this reduces to the
corresponding theorem for the morphisms of schemes
$U \to V \to W$, the quasi-coherent sheaf $a^*\mathcal{F}$,
and the point $u \in U$. Thus the theorem follows from the
corresponding result for schemes which is
More on Morphisms,
Theorem \ref{more-morphisms-theorem-criterion-flatness-fibre-Noetherian}.
\end{proof}

\begin{lemma}
\label{lemma-morphism-between-flat-Noetherian}
Let $S$ be a scheme.
Let $f : X \to Y$ and $Y \to Z$ be a morphism of algebraic spaces over $S$.
Assume
\begin{enumerate}
\item $X$, $Y$, $Z$ locally Noetherian,
\item $X$ is flat over $Z$,
\item for every $z \in |Z|$ the fibre of $X$ over $z$
is flat over the fibre of $Y$ over $z$.
\end{enumerate}
Then $f$ is flat. If $f$ is also surjective, then $Y$ is flat over $Z$.
\end{lemma}

\begin{proof}
This is a special case of
Theorem \ref{theorem-criterion-flatness-fibre-Noetherian}.
\end{proof}

\noindent
Just like for checking smoothness, if the base is Noetherian it suffices
to check flatness over Artinian rings. Here is a sample statement.

\begin{lemma}
\label{lemma-flatness-over-Noetherian-ring}
Let $A$ be a Noetherian ring. Let $I \subset A$ be an ideal.
Let $X$ be an algebraic space locally of finite presentation over
$S = \Spec(A)$. For $n \geq 1$ set $S_n = \Spec(A/I^n)$ and
$X_n = S_n \times_S X$. Let $\mathcal{F}$ be coherent $\mathcal{O}_X$-module.
If for every $n \geq 1$ the pullback $\mathcal{F}_n$ of $\mathcal{F}$ to $X$
is flat over $S_n$, then the (open) locus where $\mathcal{F}$
is flat over $X$ contains the inverse image of $V(I)$ under $X \to S$.
\end{lemma}

\begin{proof}
The locus where $\mathcal{F}$ is flat over $S$ is open in $|X|$ by
Theorem \ref{theorem-openness-flatness}.
The statement is insensitive to replacing $X$ by the members of an
\'etale covering, hence we may assume $X$ is an affine scheme.
In this case the result follows immediately from
Algebra, Lemma \ref{algebra-lemma-flat-module-powers}.
Some details omitted.
\end{proof}







\section{Normalization revisited}
\label{section-normalization}

\noindent
Normalization commutes with smooth base change.

\begin{lemma}
\label{lemma-integral-closure-smooth-pullback}
Let $S$ be a scheme. Let $f : Y \to X$ be a smooth morphism of
algebraic spaces over $S$. Let $\mathcal{A}$ be a quasi-coherent
sheaf of $\mathcal{O}_X$-algebras. The integral closure
of $\mathcal{O}_Y$ in $f^*\mathcal{A}$ is equal to $f^*\mathcal{A}'$
where $\mathcal{A}' \subset \mathcal{A}$ is the integral closure of
$\mathcal{O}_X$ in $\mathcal{A}$.
\end{lemma}

\begin{proof}
By our construction of the integral closure, see
Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-integral-closure},
this reduces immediately to the case where $X$ and $Y$ are affine.
In this case the result is
Algebra, Lemma \ref{algebra-lemma-integral-closure-commutes-smooth}.
\end{proof}

\begin{lemma}[Normalization commutes with smooth base change]
\label{lemma-normalization-smooth-localization}
Let $S$ be a scheme. Let
$$
\xymatrix{
Y_2 \ar[r] \ar[d] & Y_1 \ar[d]^f \\
X_2 \ar[r]^\varphi & X_1
}
$$
be a fibre square of algebraic spaces over $S$. Assume $f$ is quasi-compact
and quasi-separated and $\varphi$ is smooth.
Let $Y_i \to X_i' \to X_i$ be the normalization of $X_i$ in $Y_i$.
Then $X_2' \cong X_2 \times_{X_1} X_1'$.
\end{lemma}

\begin{proof}
The base change of the factorization $Y_1 \to X_1' \to X_1$ to $X_2$
is a factorization $Y_2 \to X_2 \times_{X_1} X_1' \to X_1$ and
$X_2 \times_{X_1} X_1' \to X_1$ is integral
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-integral}).
Hence we get a morphism
$h : X_2' \to X_2 \times_{X_1} X_1'$ by the universal property of
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-characterize-normalization}.
Observe that $X_2'$ is the relative spectrum of the integral closure
of $\mathcal{O}_{X_2}$ in $f_{2, *}\mathcal{O}_{Y_2}$.
If $\mathcal{A}' \subset f_{1, *}\mathcal{O}_{Y_1}$ denotes the integral
closure of $\mathcal{O}_{X_2}$, then $X_2 \times_{X_1} X_1'$ is the
relative spectrum of $\varphi^*\mathcal{A}'$ as the construction of
the relative spectrum commutes with arbitrary base change. By
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-flat-base-change-cohomology}
we know that $f_{2, *}\mathcal{O}_{Y_2} = \varphi^*f_{1, *}\mathcal{O}_{Y_1}$.
Hence the result follows from
Lemma \ref{lemma-integral-closure-smooth-pullback}.
\end{proof}









\section{Cohen-Macaulay morphisms}
\label{section-CM}

\noindent
This is the analogue of More on Morphisms, Section
\ref{more-morphisms-section-CM}.

\begin{lemma}
\label{lemma-CM-local-ring-fibre}
The property of morphisms of germs of schemes
\begin{align*}
& \mathcal{P}((X, x) \to (S, s)) = \\
& \text{the local ring }
\mathcal{O}_{X_s, x}
\text{ of the fibre is Noetherian and Cohen-Macaulay}
\end{align*}
is \'etale local on the source-and-target (Descent, Definition
\ref{descent-definition-local-source-target-at-point}).
\end{lemma}

\begin{proof}
Given a diagram as in
Descent, Definition \ref{descent-definition-local-source-target-at-point}
we obtain an \'etale morphism of fibres
$U'_{v'} \to U_v$ mapping $u'$ to $u$, see
Descent, Lemma \ref{descent-lemma-etale-on-fiber}.
Thus the strict henselizations of the local rings
$\mathcal{O}_{U'_{v'}, u'}$ and $\mathcal{O}_{U_v, u}$
are the same. We conclude by
More on Algebra, Lemma \ref{more-algebra-lemma-henselization-CM}.
\end{proof}

\begin{definition}
\label{definition-CM}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Assume the fibres of $f$ are locally Noetherian
(Divisors on Spaces, Definition
\ref{spaces-divisors-definition-locally-Noetherian-fibre}).
\begin{enumerate}
\item Let $x \in |X|$, and $y = f(x)$. We say that $f$ is
{\it Cohen-Macaulay at $x$} if $f$ is flat at $x$ and
the equivalent conditions of
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-local-source-target-at-point}
hold for the property $\mathcal{P}$ described in
Lemma \ref{lemma-CM-local-ring-fibre}.
\item We say $f$ is a {\it Cohen-Macaulay morphism} if $f$ is
Cohen-Macaulay at every point of $X$.
\end{enumerate}
\end{definition}

\noindent
Here is a translation.

\begin{lemma}
\label{lemma-CM}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume the fibres of $f$ are locally Noetherian.
The following are equivalent
\begin{enumerate}
\item $f$ is Cohen-Macaulay,
\item $f$ is flat and for some surjective \'etale morphism $V \to Y$
where $V$ is a scheme, the fibres of $X_V \to V$
are Cohen-Macaulay algebraic spaces, and
\item $f$ is flat and for any \'etale morphism $V \to Y$
where $V$ is a scheme, the fibres of $X_V \to V$
are Cohen-Macaulay algebraic spaces.
\end{enumerate}
Given $x \in |X|$ with image $y \in |Y|$ the following are
equivalent
\begin{enumerate}
\item[(a)] $f$ is Cohen-Macaulay at $x$, and
\item[(b)] $\mathcal{O}_{Y, \overline{y}} \to \mathcal{O}_{X, \overline{x}}$
is flat and
$\mathcal{O}_{X, \overline{x}}/
\mathfrak m_{\overline{y}}\mathcal{O}_{X, \overline{x}}$ is Cohen-Macaulay.
\end{enumerate}
\end{lemma}

\begin{proof}
Given an \'etale morphism $V \to Y$ where $V$ is a scheme
choose a scheme $U$ and a surjective \'etale morphism $U \to X \times_Y V$.
Consider the commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
Let $u \in U$ with images $x \in |X|$, $y \in |Y|$, and $v \in V$.
Then $f$ is Cohen-Macaulay at $x$ if and only if $U \to V$ is
Cohen-Macaulay at $u$ (by definition). Moreover the morphism
$U_v \to X_v = (X_V)_v$ is surjective \'etale. Hence the scheme $U_v$ is
Cohen-Macaulay if and only if the algebraic space $X_v$ is Cohen-Macaulay.
Thus the equivalence of (1), (2), and (3) follows from the
corresponding equivalence for morphisms of
schemes, see More on Morphisms, Lemma \ref{more-morphisms-lemma-CM}
by a formal argument.

\medskip\noindent
Proof of equivalence of (a) and (b). The corresponding equivalence
for flatness is Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-flat-at-point-etale-local-rings}.
Thus we may assume $f$ is flat at $x$ when proving the equivalence.
Consider a diagram and $x, y, u, v$ as above. Then
$\mathcal{O}_{Y, \overline{y}} \to \mathcal{O}_{X, \overline{x}}$
is equal to the map
$\mathcal{O}_{V, v}^{sh} \to \mathcal{O}_{U, u}^{sh}$
on strict henselizations of local rings, see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-describe-etale-local-ring}.
Thus we have
$$
\mathcal{O}_{X, \overline{x}}/
\mathfrak m_{\overline{y}}\mathcal{O}_{X, \overline{x}} =
(\mathcal{O}_{U, u}/\mathfrak m_v \mathcal{O}_{U, u})^{sh}
$$
by Algebra, Lemma \ref{algebra-lemma-quotient-strict-henselization}.
Thus we have to show that the Noetherian local ring
$\mathcal{O}_{U, u}/\mathfrak m_v \mathcal{O}_{U, u}$
is Cohen-Macaulay if and only if its strict henselization is.
This is More on Algebra, Lemma \ref{more-algebra-lemma-henselization-CM}.
\end{proof}

\begin{lemma}
\label{lemma-composition-CM}
Let $S$ be a scheme.
Let $f : X \to Y$ and $g : Y \to Z$ be morphisms of algebraic spaces
over $S$. Assume that the
fibres of $f$, $g$, and $g \circ f$ are locally Noetherian.
Let $x \in |X|$ with images $y \in |Y|$ and $z \in |Z|$.
\begin{enumerate}
\item If $f$ is Cohen-Macaulay at $x$ and $g$ is Cohen-Macaulay
at $f(x)$, then $g \circ f$ is Cohen-Macaulay at $x$.
\item If $f$ and $g$ are Cohen-Macaulay, then $g \circ f$ is Cohen-Macaulay.
\item If $g \circ f$ is Cohen-Macaulay at $x$ and $f$ is flat at $x$,
then $f$ is Cohen-Macaulay at $x$ and $g$ is Cohen-Macaulay at $f(x)$.
\item If $f \circ g$ is Cohen-Macaulay and $f$ is flat, then
$f$ is Cohen-Macaulay and $g$ is Cohen-Macaulay at every point in
the image of $f$.
\end{enumerate}
\end{lemma}

\begin{proof}
Working \'etale locally this follows from the corresponding result for
schemes, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-composition-CM}.
Alternatively, we can use the equivalence of (a) and (b) in
Lemma \ref{lemma-CM}. Thus we consider the local homomorphism
of Noetherian local rings
$$
\mathcal{O}_{Y, \overline{y}}/
\mathfrak m_{\overline{z}}\mathcal{O}_{Y, \overline{y}}
\longrightarrow
\mathcal{O}_{X, \overline{x}}/
\mathfrak m_{\overline{z}}\mathcal{O}_{X, \overline{x}}
$$
whose fibre is
$$
\mathcal{O}_{X, \overline{x}}/
\mathfrak m_{\overline{y}}\mathcal{O}_{X, \overline{x}}
$$
and we use Algebra, Lemma \ref{algebra-lemma-CM-goes-up}.
\end{proof}

\begin{lemma}
\label{lemma-flat-morphism-from-CM}
Let $S$ be a scheme.
Let $f : X \to Y$ be a flat morphism of locally Noetherian
algebraic spaces over $S$.
If $X$ is Cohen-Macaulay, then $f$ is Cohen-Macaulay and
$\mathcal{O}_{Y, f(\overline{x})}$ is Cohen-Macaulay for all $x \in |X|$.
\end{lemma}

\begin{proof}
After translating into algebra using Lemma \ref{lemma-CM}
(compare with the proof of
Lemma \ref{lemma-composition-CM}) this follows from
Algebra, Lemma \ref{algebra-lemma-CM-goes-up}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-CM}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Assume the fibres of $f$ are locally Noetherian.
Let $Y' \to Y$ be locally of finite type. Let $f' : X' \to Y'$
be the base change of $f$.
Let $x' \in |X'|$ be a point with image $x \in |X|$.
\begin{enumerate}
\item If $f$ is Cohen-Macaulay at $x$, then
$f' : X' \to Y'$ is Cohen-Macaulay at $x'$.
\item If $f$ is flat at $x$ and $f'$ is Cohen-Macaulay at $x'$, then $f$
is Cohen-Macaulay at $x$.
\item If $Y' \to Y$ is flat at $f'(x')$ and $f'$ is Cohen-Macaulay at
$x'$, then $f$ is Cohen-Macaulay at $x$.
\end{enumerate}
\end{lemma}

\begin{proof}
Denote $y \in |Y|$ and $y' \in |Y'|$ the image of $x'$.
Choose a surjective \'etale morphism $V \to Y$ where $V$ is a scheme.
Choose a surjective \'etale morphism $U \to X \times_Y V$ where
$U$ is a scheme.
Choose a surjectiev \'etale morphism $V' \to Y' \times_Y V$
where $V'$ is a scheme.
Then $U' = U \times_V V'$ is a scheme which comes equipped
with a surjective \'etale morphism $U' \to X'$.
Choose $u' \in U'$ mapping to $x'$. Denote $u \in U$ the image of $u'$.
Then the lemma follows from the lemma for
$U \to V$ and its base change $U' \to V'$ and the
points $u'$ and $u$ (this follows from the definitions).
Thus the lemma follows from the case of schemes, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-base-change-CM}.
\end{proof}

\begin{lemma}
\label{lemma-flat-finite-presentation-CM-open}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is flat and locally of finite presentation. Let
$$
W = \{x \in |X| : f\text{ is Cohen-Macaulay at }x\}
$$
Then $W$ is open in $|X|$ and the formation of $W$
commutes with arbitrary base change of $f$:
For any morphism $g : Y' \to Y$, consider
the base change $f' : X' \to Y'$ of $f$ and the
projection $g' : X' \to X$. Then the corresponding
set $W'$ for the morphism $f'$ is equal to $W' = (g')^{-1}(W)$.
\end{lemma}

\begin{proof}
Choose a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
with \'etale vertical arrows and $U$ and $V$ schemes.
Let $u \in U$ with image $x \in |X|$.
Then $f$ is Cohen-Macaulay at $x$ if and only if $U \to V$ is
Cohen-Macaulay at $u$ (by definition).
Thus we reduce to the case of the morphism $U \to V$.
See More on Morphisms, Lemma
\ref{more-morphisms-lemma-flat-finite-presentation-CM-open}.
\end{proof}

\begin{lemma}
\label{lemma-lfp-CM-relative-dimension}
Let $S$ be a scheme. Let $f : X \to Y$ be a
morphism of algebraic spaces over $S$. Assume that
$f$ is locally of finite presentation and Cohen-Macaulay.
Then there exist open and closed subschemes $X_d \subset X$
such that $X = \coprod_{d \geq 0} X_d$ and $f|_{X_d} : X_d \to Y$
has relative dimension $d$.
\end{lemma}

\begin{proof}
Choose a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
with \'etale vertical arrows and $U$ and $V$ schemes.
Then $U \to V$ is locally of finite presentation and Cohen-Macaulay
(immediate from our definitions).
Thus we have a decomposition $U = \coprod_{d \geq 0} U_d$
into open and closed subschemes with $f|_{U_d} : U_d \to V$
of relative dimension $d$, see Morphisms, Lemma
\ref{morphisms-lemma-flat-finite-presentation-CM-fibres-relative-dimension}.
Let $u \in U$ with image $x \in |X|$. Then
$f$ has relative dimension $d$ at $x$ if and only if
$U \to V$ has relative dimension $d$ at $u$
(this follows from our definitions).
In this way we see that $U_d$ is the inverse image
of a subset $X_d \subset |X|$ which is necessarily
open and closed. Denoting $X_d$ the corresponding open
and closed algebraic subspace of $X$ we see that the lemma is true.
\end{proof}







\section{Gorenstein morphisms}
\label{section-gorenstein}

\noindent
This is the analogue of Duality for Schemes, Section
\ref{duality-section-gorenstein-morphisms}.

\begin{lemma}
\label{lemma-gorenstein-local-ring-fibre}
The property of morphisms of germs of schemes
\begin{align*}
& \mathcal{P}((X, x) \to (S, s)) = \\
& \text{the local ring }
\mathcal{O}_{X_s, x}
\text{ of the fibre is Noetherian and Gorenstein}
\end{align*}
is \'etale local on the source-and-target (Descent, Definition
\ref{descent-definition-local-source-target-at-point}).
\end{lemma}

\begin{proof}
Given a diagram as in
Descent, Definition \ref{descent-definition-local-source-target-at-point}
we obtain an \'etale morphism of fibres
$U'_{v'} \to U_v$ mapping $u'$ to $u$, see
Descent, Lemma \ref{descent-lemma-etale-on-fiber}.
Thus $\mathcal{O}_{U_v, u} \to \mathcal{O}_{U'_{v'}, u'}$
is the localization of an \'etale ring map. Hence
the first is Noetherian if and only if the second is Noetherian, see
More on Algebra, Lemma \ref{more-algebra-lemma-Noetherian-etale-extension}.
Then, since $\mathcal{O}_{U'_{v'}, u'}/\mathfrak m_u \mathcal{O}_{U'_{v'}, u'}
= \kappa(u')$ (Algebra, Lemma \ref{algebra-lemma-etale-at-prime})
is a Gorenstein ring, we see that
$\mathcal{O}_{U_v, u}$ is Gorenstein if and only if
$\mathcal{O}_{U'_{v'}, u'}$ is Gorenstein by
Dualizing Complexes, Lemma \ref{dualizing-lemma-flat-under-gorenstein}.
\end{proof}

\begin{definition}
\label{definition-gorenstein}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Assume the fibres of $f$ are locally Noetherian
(Divisors on Spaces, Definition
\ref{spaces-divisors-definition-locally-Noetherian-fibre}).
\begin{enumerate}
\item Let $x \in |X|$, and $y = f(x)$. We say that $f$ is
{\it Gorenstein at $x$} if $f$ is flat at $x$ and
the equivalent conditions of
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-local-source-target-at-point}
hold for the property $\mathcal{P}$ described in
Lemma \ref{lemma-gorenstein-local-ring-fibre}.
\item We say $f$ is a {\it Gorenstein morphism} if $f$ is
Gorenstein at every point of $X$.
\end{enumerate}
\end{definition}

\noindent
Here is a translation.

\begin{lemma}
\label{lemma-gorenstein}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume the fibres of $f$ are locally Noetherian.
The following are equivalent
\begin{enumerate}
\item $f$ is Gorenstein,
\item $f$ is flat and for some surjective \'etale morphism $V \to Y$
where $V$ is a scheme, the fibres of $X_V \to V$
are Gorenstein algebraic spaces, and
\item $f$ is flat and for any \'etale morphism $V \to Y$
where $V$ is a scheme, the fibres of $X_V \to V$
are Gorenstein algebraic spaces.
\end{enumerate}
Given $x \in |X|$ with image $y \in |Y|$ the following are
equivalent
\begin{enumerate}
\item[(a)] $f$ is Gorenstein at $x$, and
\item[(b)] $\mathcal{O}_{Y, \overline{y}} \to \mathcal{O}_{X, \overline{x}}$
is flat and
$\mathcal{O}_{X, \overline{x}}/
\mathfrak m_{\overline{y}}\mathcal{O}_{X, \overline{x}}$ is Gorenstein.
\end{enumerate}
\end{lemma}

\begin{proof}
Given an \'etale morphism $V \to Y$ where $V$ is a scheme
choose a scheme $U$ and a surjective \'etale morphism $U \to X \times_Y V$.
Consider the commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
Let $u \in U$ with images $x \in |X|$, $y \in |Y|$, and $v \in V$.
Then $f$ is Gorenstein at $x$ if and only if $U \to V$ is
Gorenstein at $u$ (by definition). Moreover the morphism
$U_v \to X_v = (X_V)_v$ is surjective \'etale. Hence the scheme $U_v$ is
Gorenstein if and only if the algebraic space $X_v$ is Gorenstein.
Thus the equivalence of (1), (2), and (3) follows from the
corresponding equivalence for morphisms of
schemes, see Duality for Schemes, Lemma \ref{duality-lemma-gorenstein}
by a formal argument.

\medskip\noindent
Proof of equivalence of (a) and (b). The corresponding equivalence
for flatness is Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-flat-at-point-etale-local-rings}.
Thus we may assume $f$ is flat at $x$ when proving the equivalence.
Consider a diagram and $x, y, u, v$ as above. Then
$\mathcal{O}_{Y, \overline{y}} \to \mathcal{O}_{X, \overline{x}}$
is equal to the map
$\mathcal{O}_{V, v}^{sh} \to \mathcal{O}_{U, u}^{sh}$
on strict henselizations of local rings, see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-describe-etale-local-ring}.
Thus we have
$$
\mathcal{O}_{X, \overline{x}}/
\mathfrak m_{\overline{y}}\mathcal{O}_{X, \overline{x}} =
(\mathcal{O}_{U, u}/\mathfrak m_v \mathcal{O}_{U, u})^{sh}
$$
by Algebra, Lemma \ref{algebra-lemma-quotient-strict-henselization}.
Thus we have to show that the Noetherian local ring
$\mathcal{O}_{U, u}/\mathfrak m_v \mathcal{O}_{U, u}$
is Gorenstein if and only if its strict henselization is.
This follows immediately from
Dualizing Complexes, Lemma
\ref{dualizing-lemma-completion-henselization-dualizing}
and the definition of a Gorenstein local ring as a
Noetherian local ring which is a dualizing complex over itself.
\end{proof}

\begin{lemma}
\label{lemma-composition-gorenstein}
Let $S$ be a scheme.
Let $f : X \to Y$ and $g : Y \to Z$ be morphisms of algebraic spaces
over $S$. Assume that the
fibres of $f$, $g$, and $g \circ f$ are locally Noetherian.
Let $x \in |X|$ with images $y \in |Y|$ and $z \in |Z|$.
\begin{enumerate}
\item If $f$ is Gorenstein at $x$ and $g$ is Gorenstein
at $f(x)$, then $g \circ f$ is Gorenstein at $x$.
\item If $f$ and $g$ are Gorenstein, then $g \circ f$ is Gorenstein.
\item If $g \circ f$ is Gorenstein at $x$ and $f$ is flat at $x$,
then $f$ is Gorenstein at $x$ and $g$ is Gorenstein at $f(x)$.
\item If $f \circ g$ is Gorenstein and $f$ is flat, then
$f$ is Gorenstein and $g$ is Gorenstein at every point in
the image of $f$.
\end{enumerate}
\end{lemma}

\begin{proof}
Working \'etale locally this follows from the corresponding result for
schemes, see Duality for Schemes, Lemma
\ref{duality-lemma-composition-gorenstein}.
Alternatively, we can use the equivalence of (a) and (b) in
Lemma \ref{lemma-gorenstein}. Thus we consider the local homomorphism
of Noetherian local rings
$$
\mathcal{O}_{Y, \overline{y}}/
\mathfrak m_{\overline{z}}\mathcal{O}_{Y, \overline{y}}
\longrightarrow
\mathcal{O}_{X, \overline{x}}/
\mathfrak m_{\overline{z}}\mathcal{O}_{X, \overline{x}}
$$
whose fibre is
$$
\mathcal{O}_{X, \overline{x}}/
\mathfrak m_{\overline{y}}\mathcal{O}_{X, \overline{x}}
$$
and we use Dualizing Complexes, Lemma
\ref{dualizing-lemma-flat-under-gorenstein}.
\end{proof}

\begin{lemma}
\label{lemma-flat-morphism-from-gorenstein}
Let $S$ be a scheme.
Let $f : X \to Y$ be a flat morphism of locally Noetherian
algebraic spaces over $S$.
If $X$ is Gorenstein, then $f$ is Gorenstein and
$\mathcal{O}_{Y, f(\overline{x})}$ is Gorenstein for all $x \in |X|$.
\end{lemma}

\begin{proof}
After translating into algebra using Lemma \ref{lemma-gorenstein}
(compare with the proof of
Lemma \ref{lemma-composition-gorenstein}) this follows from
Dualizing Complexes, Lemma \ref{dualizing-lemma-flat-under-gorenstein}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-gorenstein}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Assume the fibres of $f$ are locally Noetherian.
Let $Y' \to Y$ be locally of finite type. Let $f' : X' \to Y'$
be the base change of $f$.
Let $x' \in |X'|$ be a point with image $x \in |X|$.
\begin{enumerate}
\item If $f$ is Gorenstein at $x$, then
$f' : X' \to Y'$ is Gorenstein at $x'$.
\item If $f$ is flat at $x$ and $f'$ is Gorenstein at $x'$, then $f$
is Gorenstein at $x$.
\item If $Y' \to Y$ is flat at $f'(x')$ and $f'$ is Gorenstein at
$x'$, then $f$ is Gorenstein at $x$.
\end{enumerate}
\end{lemma}

\begin{proof}
Denote $y \in |Y|$ and $y' \in |Y'|$ the image of $x'$.
Choose a surjective \'etale morphism $V \to Y$ where $V$ is a scheme.
Choose a surjective \'etale morphism $U \to X \times_Y V$ where
$U$ is a scheme.
Choose a surjectiev \'etale morphism $V' \to Y' \times_Y V$
where $V'$ is a scheme.
Then $U' = U \times_V V'$ is a scheme which comes equipped
with a surjective \'etale morphism $U' \to X'$.
Choose $u' \in U'$ mapping to $x'$. Denote $u \in U$ the image of $u'$.
Then the lemma follows from the lemma for
$U \to V$ and its base change $U' \to V'$ and the
points $u'$ and $u$ (this follows from the definitions).
Thus the lemma follows from the case of schemes, see
Duality for Schemes, Lemma \ref{duality-lemma-base-change-gorenstein}.
\end{proof}

\begin{lemma}
\label{lemma-flat-finite-presentation-gorenstein-open}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is flat and locally of finite presentation. Let
$$
W = \{x \in |X| : f\text{ is Gorenstein at }x\}
$$
Then $W$ is open in $|X|$ and the formation of $W$
commutes with arbitrary base change of $f$:
For any morphism $g : Y' \to Y$, consider
the base change $f' : X' \to Y'$ of $f$ and the
projection $g' : X' \to X$. Then the corresponding
set $W'$ for the morphism $f'$ is equal to $W' = (g')^{-1}(W)$.
\end{lemma}

\begin{proof}
Choose a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
Let $u \in U$ with image $x \in |X|$.
Then $f$ is Gorenstein at $x$ if and only if $U \to V$ is
Gorenstein at $u$ (by definition).
Thus we reduce to the case of the morphism $U \to V$
of schemes. Openness is proven in
Duality for Schemes, Lemma
\ref{duality-lemma-flat-finite-presentation-characterize-gorenstein}
and compatibility with base change in
Duality for Schemes, Lemma \ref{duality-lemma-flat-lft-base-change-gorenstein}.
\end{proof}










\section{Slicing Cohen-Macaulay morphisms}
\label{section-slice}

\noindent
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$.
Let $f_1, \ldots, f_r \in \Gamma(X, \mathcal{O}_X)$. In this case we
denote $V(f_1, \ldots, f_r)$ the {\it closed subspace of $X$ cut out by
$f_1, \ldots, f_r$}. More precisely, we can define $V(f_1, \ldots, f_r)$
as the closed subspace of $X$ corresponding to the quasi-coherent sheaf
of ideals generated by $f_1, \ldots, f_r$, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-closed-immersion-ideals}.
Alternatively, we can choose a presentation $X = U/R$ and consider the
closed subscheme $Z \subset U$ cut out by $f_1|U, \ldots, f_r|_U$.
It is clear that $Z$ is an $R$-invariant (see
Groupoids, Definition \ref{groupoids-definition-invariant-open})
closed subscheme and we may set $V(f_1, \ldots, f_r) = Z/R_Z$.

\begin{lemma}
\label{lemma-slice}
Let $S$ be a scheme. Consider a cartesian diagram
$$
\xymatrix{
X \ar[d] & F \ar[l]^p \ar[d] \\
Y & \Spec(k) \ar[l]
}
$$
where $X \to Y$ is a morphism of algebraic spaces over $S$
which is flat and locally of finite presentation, and where
$k$ is a field over $S$. Let $f_1, \ldots, f_r \in \Gamma(X, \mathcal{O}_X)$
and $z \in |F|$ such that $f_1, \ldots, f_r$ map to a regular sequence
in the local ring $\mathcal{O}_{F, \overline{z}}$.
Then, after replacing $X$ by an open subspace containing $p(z)$, the morphism
$$
V(f_1, \ldots, f_r) \longrightarrow Y
$$
is flat and locally of finite presentation.
\end{lemma}

\begin{proof}
Set $Z = V(f_1, \ldots, f_r)$. It is clear that $Z \to X$ is locally of
finite presentation, hence the composition $Z \to Y$ is locally of finite
presentation, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-composition-finite-presentation}.
Hence it suffices to show that $Z \to Y$ is flat in a neighbourhood of $p(z)$.
Let $k'/k$ be an extension field. Then
$F' = F \times_{\Spec(k)} \Spec(k')$ is surjective and
flat over $F$, hence we can find a point $z' \in |F'|$ mapping to $z$
and the local ring map
$\mathcal{O}_{F, \overline{z}} \to \mathcal{O}_{F', \overline{z}'}$ is
flat, see
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-flat-at-point-etale-local-rings}.
Hence the image of $f_1, \ldots, f_r$ in
$\mathcal{O}_{F', \overline{z}'}$ is a regular sequence too, see
Algebra, Lemma \ref{algebra-lemma-flat-increases-depth}.
Thus, during the proof we may replace $k$ by an extension field.
In particular, we may assume that $z \in |F|$ comes from a section
$z : \Spec(k) \to F$ of the structure morphism $F \to \Spec(k)$.

\medskip\noindent
Choose a scheme $V$ and a surjective \'etale morphism
$V \to Y$. Choose a scheme $U$ and a surjective \'etale morphism
$U \to X \times_Y V$. After possibly enlarging $k$ once more we may
assume that $\Spec(k) \to F \to X$ factors through $U$ (as
$U \to X$ is surjective). Let
$u : \Spec(k) \to U$ be such a factorization and denote $v \in V$
the image of $u$. Note that the morphisms
$$
U_v \times_{\Spec(\kappa(v))} \Spec(k) =
U \times_V \Spec(k) \to U \times_Y \Spec(k) \to F
$$
are \'etale (the first as the base change of $V \to V \times_Y V$ and
the second as the base change of $U \to X$). Moreover, by construction
the point $u : \Spec(k) \to U$ gives a point of the left most
space which maps to $z$ on the right. Hence the elements
$f_1, \ldots, f_r$ map to a regular sequence in the local ring
on the right of the following map
$$
\mathcal{O}_{U_v, u}
\longrightarrow
\mathcal{O}_{U_v \times_{\Spec(\kappa(v)} \Spec(k), \overline{u}}
=
\mathcal{O}_{U \times_V \Spec(k), \overline{u}}.
$$
But since the displayed arrow is flat (combine
More on Flatness, Lemma \ref{flat-lemma-flat-up-down-henselization}
and
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-flat-at-point-etale-local-rings})
we see from
Algebra, Lemma \ref{algebra-lemma-flat-increases-depth}
that $f_1, \ldots, f_r$ maps to a regular sequence in
$\mathcal{O}_{U_v, u}$. By
More on Morphisms, Lemma \ref{more-morphisms-lemma-slice-given-elements}
we conclude that the morphism of schemes
$$
V(f_1, \ldots, f_r) \times_X U = V(f_1|_U, \ldots, f_r|_U) \to V
$$
is flat in an open neighbourhood $U'$ of $u$. Let $X' \subset X$
be the open subspace corresponding to the image of
$|U'| \to |X|$ (see
Properties of Spaces, Lemmas
\ref{spaces-properties-lemma-topology-points} and
\ref{spaces-properties-lemma-open-subspaces}).
We conclude that $V(f_1, \ldots, f_r) \cap X' \to Y$ is flat
(see
Morphisms of Spaces, Definition \ref{spaces-morphisms-definition-flat})
as
we have the commutative diagram
$$
\xymatrix{
V(f_1, \ldots, f_r) \times_X U' \ar[d]_a \ar[r] & V \ar[d]^b \\
V(f_1, \ldots, f_r) \cap X' \ar[r] & Y
}
$$
with $a, b$ \'etale and $a$ surjective.
\end{proof}






\section{Reduced fibres}
\label{section-reduced}

\noindent
This section is the analogue of
More on Morphisms, Section \ref{more-morphisms-section-reduced}.

\begin{lemma}
\label{lemma-geometrically-reduced-fibre}
Let $S$ be a scheme. Let $f : X \to Y$ be a
morphism of algebraic spaces over $S$. Let $y \in |Y|$.
The following are equivalent
\begin{enumerate}
\item for some morphism $\Spec(k) \to Y$ in the equivalence class
of $y$ the algebraic space $X_k$ is geometrically reduced over $k$,
\item for every morphism $\Spec(k) \to Y$ in the equivalence class
of $y$ the algebraic space $X_k$ is geometrically reduced over $k$,
\item for every morphism $\Spec(k) \to Y$ in the equivalence class
of $y$ the algebraic space $X_k$ is reduced.
\end{enumerate}
\end{lemma}

\begin{proof}
This follows immediately from Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-geometrically-reduced-upstairs}
and the definition of the equivalence relation defining $|X|$
given in
Properties of Spaces, Section \ref{spaces-properties-section-points}.
\end{proof}

\begin{definition}
\label{definition-geometrically-reduced-fibre}
Let $S$ be a scheme. Let $f : X \to Y$ be a
morphism of algebraic spaces over $S$. Let $y \in |Y|$.
We say {\it the fibre of $f : X \to Y$ at $y$ is geometrically reduced}
if the equivalent conditions of
Lemma \ref{lemma-geometrically-reduced-fibre} hold.
\end{definition}

\noindent
Here are the obligatory lemmas.

\begin{lemma}
\label{lemma-base-change-fibres-geometrically-reduced}
Let $S$ be a scheme. Let $f : X \to Y$ and $g : Y' \to Y$
be morphisms of algebraic spaces over $S$. Denote
$f' : X' \to Y'$ the base change of $f$ by $g$. Then
\begin{align*}
\{y' \in |Y'| :
\text{the fibre of }f' : X' \to Y'\text{ at }y'
\text{ is geometrically reduced}\} \\
= g^{-1}(\{y \in |Y| :
\text{the fibre of }f : X \to Y\text{ at }y
\text{ is geometrically reduced}\}).
\end{align*}
\end{lemma}

\begin{proof}
For $y' \in |Y'|$ choose a morphism $\Spec(k) \to Y'$
in the equivalence class of $y'$. Then $g(y')$ is
represented by the composition $\Spec(k) \to Y' \to Y$.
Hence $X' \times_{Y'} \Spec(k) = X \times_Y \Spec(k)$
and the result follows from the definition.
\end{proof}

\begin{lemma}
\label{lemma-geometrically-reduced-constructible}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$ which is quasi-compact and
locally of finite presentation. Then the set
$$
E = \{y \in |Y| : \text{the fibre of }f : X \to Y\text{ at }y
\text{ is geometrically reduced}\}
$$
is \'etale locally constructible.
\end{lemma}

\begin{proof}
Choose an affine scheme $V$ and an \'etale morphism $V  \to Y$.
The meaning of the statement is that the inverse image of $E$
in $|V|$ is constructible. By
Lemma \ref{lemma-base-change-fibres-geometrically-reduced}
we may replace $Y$ by $V$, i.e., we may assume that $Y$
is an affine scheme. Then $X$ is quasi-compact. Choose an
affine scheme $U$ and a surjective \'etale morphism $U \to X$.
For a morphism $\Spec(k) \to Y$ the morphism between fibres
$U_k \to X_k$ is surjective \'etale. Hence $U_k$ is geometrically
reduced over $k$ if and only if $X_k$ is geometrically reduced
over $k$, see Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-geometrically-reduced-etale-local}.
Thus the set $E$ for $X \to Y$ is the same as the set $E$
for $U \to Y$.
In this way we see that the lemma follows from the case
of schemes, see More on Morphisms, Lemma
\ref{more-morphisms-lemma-geometrically-reduced-constructible}.
\end{proof}

\begin{lemma}
\label{lemma-proper-flat-over-dvr-reduced-fibre}
Let $X$ be an algebraic space over a discrete valuation ring $R$
whose structure morphism $X \to \Spec(R)$ is proper and flat.
If the special fibre is reduced, then
both $X$ and the generic fibre $X_\eta$ are reduced.
\end{lemma}

\begin{proof}
Choose an \'etale morphism $U \to X$ where $U$ is an affine scheme.
Then $U$ is of finite type over $R$. Let $u \in U$ be in the special fibre.
The local ring $A = \mathcal{O}_{U, u}$ is essentially of finite
type over $R$, hence Noetherian. Let $\pi \in R$ be a uniformizer.
Since $X$ is flat over $R$, we see that $\pi \in \mathfrak m_A$
is a nonzerodivisor on $A$ and since the special fibre of $X$
is reduced, we have that $A/\pi A$ is reduced.
If $a \in A$, $a \not = 0$ then there exists an $n \geq 0$ and an element
$a' \in A$ such that $a = \pi^n a'$ and $a' \not \in \pi A$.
This follows from Krull intersection theorem
(Algebra, Lemma \ref{algebra-lemma-intersect-powers-ideal-module-zero}).
If $a$ is nilpotent, so is $a'$, because $\pi$ is a nonzerodivisor.
But $a'$ maps to a nonzero element of the reduced ring $A/\pi A$
so this is impossible. Hence $A$ is reduced. It follows that
there exists an open neighbourhood of $u$ in $U$ which is reduced
(small detail omitted; use that $U$ is Noetherian).
Thus we can find an \'etale morphism $U \to X$ with $U$ a reduced
scheme, such that every point of the special fibre of $X$ is
in the image. Since $X$ is proper over $R$ it follows that
$U \to X$ is surjective. Hence $X$ is reduced. Since the generic fibre of
$U \to \Spec(R)$ is reduced as well (on affine pieces
it is computed by taking localizations), we conclude the same thing
is true for the generic fibre.
\end{proof}

\begin{lemma}
\label{lemma-geometrically-reduced-open}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic
spaces over $S$. If $f$ is flat, proper, and of finite presentation,
then the set
$$
E = \{y \in |Y| : \text{the fibre of }f : X \to Y\text{ at }y
\text{ is geometrically reduced}\}
$$
is open in $|Y|$.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-base-change-fibres-geometrically-reduced}
formation of $E$ commutes with base change. To check a subset
of $|Y|$ is open, we may replace $Y$ by the members of an
\'etale covering. Thus we may assume $Y$ is affine.
Then $Y$ is a cofiltered limit of affine
schemes of finite type over $\mathbf{Z}$.
Hence we can assume $X \to Y$ is the
base change of $X_0 \to Y_0$ where $Y_0$ is the spectrum of a finite
type $\mathbf{Z}$-algebra and $X_0 \to Y_0$ is flat and proper.
See Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-finite-presentation},
\ref{spaces-limits-lemma-descend-flat}, and
\ref{spaces-limits-lemma-eventually-proper}. Since the formation of
$E$ commutes with base change (see above),
we may assume the base is Noetherian.

\medskip\noindent
Assume $Y$ is Noetherian. The set is constructible by
Lemma \ref{lemma-geometrically-reduced-constructible}.
Hence it suffices to show the set is stable under generalization
(Topology, Lemma \ref{topology-lemma-characterize-closed-Noetherian}). By
Properties, Lemma \ref{properties-lemma-locally-Noetherian-specialization-dvr}
we reduce to the case where $Y = \Spec(R)$, $R$ is a discrete
valuation ring, and the closed fibre $X_y$ is geometrically
reduced. To show: the generic fibre $X_\eta$ is geometrically reduced.

\medskip\noindent
If not then there exists a finite extension $L$ of the fraction
field of $R$ such that $X_L$ is not reduced, see
Spaces over Fields, Lemmas
\ref{spaces-over-fields-lemma-perfect-reduced} (characteristic zero) and
\ref{spaces-over-fields-lemma-geometrically-reduced-positive-characteristic}
(positive characteristic). There exists a discrete valuation ring
$R' \subset L$ with fraction field $L$ dominating $R$, see
Algebra, Lemma \ref{algebra-lemma-integral-closure-Dedekind}.
After replacing $R$ by $R'$ we reduce to
Lemma \ref{lemma-proper-flat-over-dvr-reduced-fibre}.
\end{proof}







\section{Connected components of fibres}
\label{section-connected}

\noindent
This section is the analogue of
More on Morphisms, Section \ref{more-morphisms-section-connected}.

\begin{lemma}
\label{lemma-base-change-fibres-nr-geometrically-connected-components}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$. Let
$$
n_{X/Y} : |Y| \to \{0, 1, 2, 3, \ldots, \infty\}
$$
be the function which associates to $y \in Y$ the number of connected
components of $X_k$ where $\Spec(k) \to Y$ is in the equivalence
class of $y$ with $k$ algebraically closed.
This is well defined and if $g : Y' \to Y$ is a morphism then
$$
n_{X'/Y'} = n_{X/Y} \circ g
$$
where $X' \to Y'$ is the base change of $f$.
\end{lemma}

\begin{proof}
Suppose that $y' \in Y'$ has image $y \in Y$. Let $\Spec(k') \to Y'$
be in the equivalence class of $y'$ with $k'$ algebraically closed.
Then we can choose a commutative diagram
$$
\xymatrix{
\Spec(K) \ar[r] \ar[rd] &
\Spec(k') \ar[r] & Y' \ar[d] \\
& \Spec(k) \ar[r] & Y
}
$$
where $K$ is an algebraically closed field.
The result follows as the morphisms of schemes
$$
\xymatrix{
X'_{k'} & (X'_{k'})_K = (X_k)_K \ar[l] \ar[r] & X_k
}
$$
induce bijections between connected components, see
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-separably-closed-field-connected-components}.
To use this to prove the function is well defined take $Y' = Y$.
\end{proof}







\section{Dimension of fibres}
\label{section-dimension}

\noindent
This section is the analogue of
More on Morphisms, Section \ref{more-morphisms-section-dimension}.

\begin{lemma}
\label{lemma-dimension-fibre}
Let $S$ be a scheme. Let $f : X \to Y$ be a finite type morphism of
algebraic spaces over $S$. Let $y \in |Y|$. The following quantities
are the same
\begin{enumerate}
\item $d = -\infty$ if $y$ is not in the image of $|f|$ and
otherwise the minimal integer $d$ such that $f$ has relative dimension $\leq d$
at every $x \in |X|$ mapping to $y$,
\item the dimension of the algebraic space $X_k = \Spec(k) \times_Y X$
for any morphism $\Spec(k) \to Y$ in the equivalence class defining $y$.
\end{enumerate}
\end{lemma}

\begin{proof}
To parse this one has to consult
Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-dimension-fibre},
Properties of Spaces,
Definition \ref{spaces-properties-definition-dimension},
Properties of Spaces,
Definition \ref{spaces-properties-definition-dimension-at-point}.
We will show that the numbers in (1) and (2) are equal for
a fixed morphism $\Spec(k) \to Y$.
Choose an \'etale morphism $V \to Y$ where $V$ is an affine
scheme and a point $v \in V$ mapping to $y$.
Since $V \times_Y \Spec(k) \to \Spec(k)$ is surjective \'etale
(by Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian})
we can find a finite separable extension $k'/k$
(by Morphisms, Lemma \ref{morphisms-lemma-etale-over-field})
and a commutative diagram
$$
\xymatrix{
\Spec(k') \ar[r] \ar[d] & V \ar[d] \\
\Spec(k) \ar[r] & Y
}
$$
We may replace $X \to Y$ by $V \times_Y X \to V$ and
$X_k$ by $X_{k'} = \Spec(k') \times_V (V \times_Y X)$
because this does not change the dimensions in question by
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-dimension-decent-invariant-under-etale}
and Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-dimension-fibre-after-base-change}.
Thus we may assume that $Y$ is an affine scheme.
In this case we may assume that $k = \kappa(y)$
because the dimension of $X_{\kappa(y)}$ and $X_k$
are the same by the aforementioned Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-dimension-fibre-after-base-change}
and the fact that for an algebraic space $Z$ over a field $K$ the
relative dimension of $Z$ at a point $z \in |Z|$
is the same as $\dim_z(Z)$ by definition.
Assume $Y$ is affine and $k = \kappa(y)$. Then
$X$ is quasi-compact we can choose an affine scheme $U$ and
an surjective \'etale morphism $U \to X$.
Then $\dim(X_k) = \dim(U_k) = \max \dim_u(U_k)$
is equal to the number given in (1) by definition.
\end{proof}

\begin{lemma}
\label{lemma-base-change-dimension-fibres}
Let $S$ be a scheme. Let $f : X \to Y$ be a finite type morphism of
algebraic spaces over $S$. Let
$$
n_{X/Y} : |Y| \to \{-\infty, 0, 1, 2, 3, \ldots\}
$$
be the function which associates to $y \in |Y|$ the
integer discussed in Lemma \ref{lemma-dimension-fibre}.
If $g : Y' \to Y$ is a morphism then
$$
n_{X'/Y'} = n_{X/Y} \circ |g|
$$
where $X' \to Y'$ is the base change of $f$.
\end{lemma}

\begin{proof}
This follows immediately from
Lemma \ref{lemma-dimension-fibre}.
\end{proof}

\begin{lemma}
\label{lemma-dimension-fibres-flat}
Let $S$ be a scheme.
Let $f : X \to Y$ be a flat morphism of finite presentation of
algebraic spaces over $S$. Let
$n_{X/Y}$ be the function on $Y$ giving the dimension of fibres of $f$
introduced in Lemma \ref{lemma-base-change-dimension-fibres}.
Then $n_{X/Y}$ is lower semi-continuous.
\end{lemma}

\begin{proof}
Let $V \to Y$ be a surjective \'etale morphism where $V$ is a scheme.
If we can show that the composition $n_{X/Y} \circ |g|$
is lower semi-continuous, then the lemma follows as $|g|$ is open.
Hence we may assume $Y$ is a scheme.
Working locally we may assume $V$ is an affine scheme.
Then we can choose an affine scheme $U$ and a surjective
\'etale morphism $U \to X$. Then $n_{X/Y} = n_{U/Y}$.
Hence we may assume $X$ and $Y$ are both schemes.
In this case the lemma follows from
More on Morphisms, Lemma \ref{more-morphisms-lemma-dimension-fibres-flat}.
\end{proof}

\begin{lemma}
\label{lemma-dimension-fibres-proper}
Let $S$ be a scheme.
Let $f : X \to Y$ be a proper morphism of algebraic spaces over $S$. Let
$n_{X/Y}$ be the function on $Y$ giving the dimension of fibres of $f$
introduced in Lemma \ref{lemma-base-change-dimension-fibres}.
Then $n_{X/Y}$ is upper semi-continuous.
\end{lemma}

\begin{proof}
Let $Z_d = \{x \in |X| :
\text{the fibre of }f\text{ at }x\text{ has dimension }> d\}$.
Then $Z_d$ is a closed subset of $|X|$ by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-openness-bounded-dimension-fibres}.
Since $f$ is proper $f(Z_d)$ is closed in $|Y|$.
Since $y \in f(Z_d) \Leftrightarrow n_{X/Y}(y) > d$
we see that the lemma is true.
\end{proof}

\begin{lemma}
\label{lemma-dimension-fibres-proper-flat}
Let $S$ be a scheme. Let $f : X \to Y$ be a proper, flat, finitely presented
morphism of algebraic spaces over $S$.
Let $n_{X/Y}$ be the function on $Y$ giving the dimension of fibres of $f$
introduced in Lemma \ref{lemma-base-change-dimension-fibres}.
Then $n_{X/Y}$ is locally constant.
\end{lemma}

\begin{proof}
Immediate consequence of
Lemmas \ref{lemma-dimension-fibres-flat} and
\ref{lemma-dimension-fibres-proper}.
\end{proof}





\section{Catenary algebraic spaces}
\label{section-catenary}

\noindent
This section continues the discussion started in
Decent Spaces, Section \ref{decent-spaces-section-catenary}.
The following lemma will be used in the proof of the next one.

\begin{lemma}
\label{lemma-construct-glueing}
Let $S$ be a scheme. Let $f : X \to Y$ be an integral morphism
of algebraic spaces over $S$.
Let $y \in |Y|$ be a point which can be represented by a closed immersion
$y : \Spec(k) \to Y$. Then there exists
a factorization $X \to X' \to Y$ of $f$ such that
\begin{enumerate}
\item $X' \to Y$ is integral,
\item $X \to X'$ is an isomorphism over $X' \setminus X'_y$,
\item $X'_y$ has a unique point $x'$ with $\kappa(x') = k$.
\end{enumerate}
Moreover, if $f$ is finite and $Y$ is locally Noetherian, then
$X' \to Y$ is finite.
\end{lemma}

\begin{proof}
By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-pushforward}
the sheaves $f_*\mathcal{O}_X$, $(X_y \to Y)_*\mathcal{O}_{X_y}$, and
$y_*\mathcal{O}_{\Spec(k)}$ are quasi-coherent sheaves of
$\mathcal{O}_Y$-algebras. Consider the maps
$$
f_*\mathcal{O}_Y \longrightarrow
(X_y \to Y)_*\mathcal{O}_{X_y} \longleftarrow
y_*\mathcal{O}_{\Spec(k)}
$$
The fibre product is a quasi-coherent sheaf of $\mathcal{O}_Y$-algebras
$\mathcal{A}'$ and we can define $X' \to Y$ as the relative spectrum
of $\mathcal{A}'$ over $Y$, see
Morphisms, Lemma \ref{morphisms-lemma-affine-equivalence-algebras}.
This construction commutes with arbitrary change of base.
In particular, it is clear that over the open subspace
$|Y| \setminus \{y\}$ the morphism $X \to X'$ is an isomorphism
and over $|Y| \setminus \{y\}$ the morphism $X' \to Y$ is integral.
It remains to prove the statements in a small neighbourhood of $y$.
Choose an affine scheme $V = \Spec(R)$ and an \'etale
morphism $\varphi : V \to Y$ such that $y$ is in the image of
$\varphi$. Then $V_y$ is a closed subscheme of $V$
\'etale over $k$, whence consists of finitely many points
each with residue field separable over $k$
(see Decent Spaces, Remark \ref{decent-spaces-remark-recall}).
After shrinking $V$
we may assume there is a unique closed point $v = \Spec(l) \to V$
mapping to $y$ with $l/k$ finite separable.
We may write $V \times_Y X = \Spec(C)$ with $R \to C$
an integral ring map. The stated compatibility with
base change gives us that $U \times_X Y' = \Spec(C')$ where
$$
C' = C \times_{C \otimes_R l} l
$$
Since $R \to l$ is surjective, also $C \to C \otimes_R l$
is surjective and we see that this is a fibre product of the
kind studied in More on Algebra, Situation
\ref{more-algebra-situation-module-over-fibre-product}
(with $A, A', B, B'$ corresponding to $C \otimes_R l, C, l, C'$).
Observe that $C'$ is an $R$-subalgebra of $C$ and hence
is integral over $R$; this proves (1).
Finally, More on Algebra, Lemma
\ref{more-algebra-lemma-points-of-fibre-product}
shows that $V \times_X Y' = \Spec(C')$
has a unique point $y''$ lying over $v$ with residue $l$
(this corresponds with the obvious surjective map $C' \to l$).
Thus $X_y \times_{\Spec(k)} \Spec(l)$ has a unique point
with residue field $l$. Since $l/k$ is finite separable,
this implies $X'_y$ has a unique point with residue field $k$, i.e.,
(3) holds.

\medskip\noindent
To prove the final statement, observe that if $Y$ is locally Noetherian,
then $R$ is a Noetherian ring and if $f$ is finite, then $R \to C$ is
finite. Then $C'$ is a finite type $R$-algebra by More on Algebra,
Lemma \ref{more-algebra-lemma-fibre-product-finite-type}.
This proves that $X' \to Y$ is finite.
\end{proof}

\begin{lemma}
\label{lemma-universally-catenary-dimension-function}
Let $S$ be a scheme. Let $B$ be an algebraic space over $S$.
Let $\delta : |B| \to \mathbf{Z}$ be a function.
Assume $B$ is decent, locally Noetherian, and
universally catenary and $\delta$ is a dimension function.
If $X$ is a decent algebraic space over $B$ whose structure morphism
$f : X \to B$ is locally of finite type we define
$\delta_X : |X| \to \mathbf{Z}$ by the rule
$$
\delta_X(x) = \delta(f(x)) + \text{transcendence degreeof }x/f(x)
$$
(Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-dimension-fibre}).
Then $\delta_X$ is a dimension function.
\end{lemma}

\begin{proof}
The problem is local on $B$. Thus we may assume $B$ is quasi-compact.
By Decent Spaces, Lemma
\ref{decent-spaces-lemma-locally-Noetherian-decent-quasi-separated}
we see $B$ is quasi-separated. By
Limits of Spaces, Proposition
\ref{spaces-limits-proposition-there-is-a-scheme-finite-over}
we can choose a finite surjective morphism $\pi : Y \to X$
where $Y$ is a scheme.
Claim: $\delta_Y$ is a dimension function.

\medskip\noindent
The claim implies the lemma. With $X \to B$ as in the lemma
set $Z = Y \times_B X$ with projections $p : Z \to Y$ and $q : Z \to X$.
Then we have
$$
\delta_Z(z) = \delta_Y(p(z)) + \text{transcendence degreeof }z/p(z)
$$
and $\delta_Z(z) = \delta_X(q(z))$. This follows from
Morphisms of Spaces, Lemma 
\ref{spaces-morphisms-lemma-dimension-fibre-at-a-point-additive}
and the fact that these transcendence degrees are zero
for finite morphisms. By Decent Spaces, Lemma
\ref{decent-spaces-lemma-scheme-with-dimension-function}
and the claim we find that $\delta_Z$ is a dimension function.
Then we find that $\delta_X$ is a dimension function by
Decent Spaces, Lemma
\ref{decent-spaces-lemma-check-dimension-function-finite-cover}.

\medskip\noindent
Proof of the claim. Consider a specialization $y \leadsto y'$,
$y \not = y'$ of points of the Noetherian scheme $Y$.
Then $\delta_Y(y) > \delta_Y(y')$ because there are
no specializations between points in fibres of $Y$
(see Decent Spaces, Lemma
\ref{decent-spaces-lemma-conditions-on-fibre-and-qf}).
Using this for a chain of specializations we find
$$
\delta_Y(y) - \delta_Y(y') \geq
\text{codim}(\overline{\{y'\}}, \overline{\{y\}})
$$
Our task is to show equality. By
Properties, Lemma \ref{properties-lemma-locally-Noetherian-closed-point}
we can choose a specialization $y' \leadsto y_0$.
It suffices to show
$\delta_Y(y) - \delta_Y(y_0) =
\text{codim}(\overline{\{y_0\}}, \overline{\{y\}})$
because this will imply the equality for both
$y \leadsto y'$ and $y' \leadsto y_0$.

\medskip\noindent
Choose a maximal chain
$y = y_c \leadsto y_{c - 1} \leadsto \ldots \leadsto y_0$
of specializations in $Y$.
Set $b = \pi(y)$ and $b_0 = \pi(y_0)$.
Choose a maximal chain
$b = b_e \leadsto b_{e - 1} \leadsto \ldots \leadsto b_0$
of specializations in $|B|$.
We have to show $e = c$.
Since $\pi$ is closed
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-proper})
we can find a sequence of specializations
$y = y'_e \leadsto y'_{e - 1} \leadsto \ldots \leadsto y'_0$
mapping to
$b = b_e \leadsto b_{e - 1} \leadsto \ldots \leadsto b_0$.
Observe that $y'_e \leadsto y'_{e - 1} \leadsto \ldots \leadsto y'_0$
is a maximal chain as well.
If $y_0 = y'_0$, then because $Y$ is catenary, we conclude
that $e = c$ as desired. In the next paragraph we reduce to
this case by sleight of hand and we conclude in the same manner.

\medskip\noindent
Since $\pi$ is closed we see that $b_0$ is a closed point of $|B|$.
By Decent Spaces, Lemma \ref{decent-spaces-lemma-decent-space-closed-point}
we can represent $b_0$ by a closed immersion $b_0 : \Spec(k) \to B$.
By Lemma \ref{lemma-construct-glueing}
we can find a factorization
$$
Y \to Y' \to X
$$
with $\pi' : Y' \to X$ finite and $Y \to Y'$ a morphism which
map $y_0$ and $y'_0$ to the same point and is an isomorphism
away from the inverse image of $b_0$.
(Of course $Y'$ won't be a scheme but this doesn't matter for the
argument that follows.)
Clearly the maximal chains of specializations
$y_c \leadsto y_{c - 1} \leadsto \ldots \leadsto y_0$ and
$y'_e \leadsto y'_{e - 1} \leadsto \ldots \leadsto y'_0$
map to maximal chains of specializations in $Y'$ having
the same start and end.
Since $B$ is universally catenary, we see that
$|Y'|$ is catenary and we conclude as before.
\end{proof}






\section{\'Etale localization of morphisms}
\label{section-etale-localization}

\noindent
The section is the analogue of
More on Morphisms, Section \ref{more-morphisms-section-etale-localization}.

\begin{lemma}
\label{lemma-etale-splits-off-quasi-finite-part}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $y \in |Y|$. Let $x_1, \ldots, x_n \in |X|$ mapping to $y$.
Assume that
\begin{enumerate}
\item $f$ is locally of finite type,
\item $f$ is separated,
\item $f$ is quasi-finite at $x_1, \ldots, x_n$, and
\item $f$ is quasi-compact or $Y$ is decent.
\end{enumerate}
Then there exists an \'etale morphism $(U, u) \to (Y, y)$
of pointed algebraic spaces and a decomposition
$$
U \times_Y X = W \amalg V
$$
into open and closed subspaces such that the morphism $V \to U$ is finite,
every point of the fibre of $|V| \to |U|$ over $u$ maps to an $x_i$,
and the fibre of $|W| \to |U|$ over $u$ contains no point mapping to an
$x_i$.
\end{lemma}

\begin{proof}
Let $(U, u) \to (Y, y)$ be an \'etale morphism of algebraic spaces
and consider the set of  $w \in |U \times_Y X|$ mapping to $u \in |U|$
and one of the $x_i \in |X|$. By
Decent Spaces, Lemma \ref{decent-spaces-lemma-qf-and-qc-finite-fibre}
(if $f$ is of finite type) or
Decent Spaces, Lemma \ref{decent-spaces-lemma-decent-finite-fibre}
(if $Y$ is decent) this set is finite.
It follows that we may replace $f$ by the base change
$U \times_Y X \to U$ and $x_1, \ldots, x_n$ by the set of these $w$.
In particular we may and do assume that $Y$ is an affine scheme,
whence $X$ is a separated algebraic space.

\medskip\noindent
Choose an affine scheme $Z$ and an \'etale morphism $Z \to X$ such that
$x_1, \ldots, x_n$ are in the image of $|Z| \to |X|$. The fibres of
$|Z| \to |X|$ are finite, see Properties of Spaces, Lemma
\ref{spaces-properties-lemma-finite-fibres-presentation}
(or the more general discussion in Decent Spaces, Section
\ref{decent-spaces-section-reasonable-decent}).
Let $\{z_1, \ldots, z_m\} \subset |Z|$ be the preimage of
$\{x_1, \ldots, x_n\}$. By More on Morphisms, Lemma
\ref{more-morphisms-lemma-etale-splits-off-quasi-finite-part-technical}
there exists an \'etale morphism $(U, u) \to (Y, y)$ such
that $U \times_Y Z = Z_1 \amalg Z_2$ with $Z_1 \to U$ finite and
$(Z_1)_y = \{z_1, \ldots, z_m\}$. We may assume that $U$ is affine
and hence $Z_1$ is affine too.

\medskip\noindent
Since $f$ is separated, the image $V$ of $Z_1 \to X$ is both open and closed
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-permanence}).
Set $W = X \setminus V$ to get a decomposition as in the lemma.
To finish the proof we have to show that $V \to U$ is finite.
As $Z_1 \to V$ is surjective and \'etale, $V$ is the quotient of
$Z_1$ by the \'etale equivalence relation $R = Z_1 \times_V Z_1$, see
Spaces, Lemma \ref{spaces-lemma-space-presentation}.
Since $f$ is separated, $V \to U$ is separated and $R$ is closed in
$Z_1 \times_U Z_1$. Since $Z_1 \to U$ is finite,
the projections $s, t : R \to Z_1$ are finite.
Thus $V$ is an affine scheme by
Groupoids, Proposition \ref{groupoids-proposition-finite-flat-equivalence}.
By Morphisms, Lemma \ref{morphisms-lemma-image-proper-is-proper}
we conclude that $V \to U$ is proper and by
Morphisms, Lemma \ref{morphisms-lemma-finite-proper}
we conclude that $V \to U$ is finite,
thereby finishing the proof.
\end{proof}

\begin{lemma}
\label{lemma-etale-splits-off-just-one-quasi-finite-part}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $x \in |X|$ with image $y \in |Y|$. Assume that
\begin{enumerate}
\item $f$ is locally of finite type,
\item $f$ is separated, and
\item $f$ is quasi-finite at $x$.
\end{enumerate}
Then there exists an \'etale morphism $(U, u) \to (Y, y)$
of pointed algebraic spaces and a decomposition
$$
U \times_Y X = W \amalg V
$$
into open and closed subspaces such that the morphism $V \to U$ is finite
and there exists a point $v \in |V|$ which maps to $x$ in $|X|$
and $u$ in $|U|$.
\end{lemma}

\begin{proof}
Pick a scheme $U$, a point $u \in U$, and an \'etale morphism
$U \to Y$ mapping $u$ to $y$. There exists a point $x' \in |U \times_Y X|$
mapping to $x$ in $|X|$ and $u$ in $|U|$ (Properties of Spaces,
Lemma \ref{spaces-properties-lemma-points-cartesian}).
To finish, apply Lemma \ref{lemma-etale-splits-off-quasi-finite-part}
to the morphism $U \times_Y X \to U$ and the point $x'$.
It applies because $U$ is a scheme and hence $u$ comes from
the monomorphism $\Spec(\kappa(u)) \to U$.
\end{proof}










\section{Zariski's Main Theorem}
\label{section-structure-quasi-finite}

\noindent
In this section we apply the results of the previous section to
prove Zariski's main theorem for morphisms of algebraic spaces.
This section is the analogue of More on Morphisms, Section
\ref{more-morphisms-section-application-etale-neighbourhoods}.

\begin{lemma}
\label{lemma-finite-type-separated}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic
spaces over $S$ which is of finite type and separated.
Let $Y'$ be the normalization of $Y$ in $X$. Picture:
$$
\xymatrix{
X \ar[rd]_f \ar[rr]_{f'} & & Y' \ar[ld]^\nu \\
& Y &
}
$$
Then there exists an open subspace $U' \subset Y'$ such that
\begin{enumerate}
\item $(f')^{-1}(U') \to U'$ is an isomorphism, and
\item $(f')^{-1}(U') \subset X$ is the set of points at which
$f$ is quasi-finite.
\end{enumerate}
\end{lemma}

\begin{proof}
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-finite-type-quasi-finite-part}
there is an open subspace $U \subset X$ corresponding to the points
of $|X|$ where $f$ is quasi-finite. We have to prove
\begin{enumerate}
\item[(a)] the image of $|U| \to |Y'|$ is $|U'|$ for some open subspace
$U'$ of $Y'$,
\item[(b)] $U = f^{-1}(U')$, and
\item[(c)] $U \to U'$ is an isomorphism.
\end{enumerate}
Since formation of $U$ commutes with arbitrary base change
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-finite-type-quasi-finite-part}),
since formation of the normalization $Y'$ commutes with smooth
base change (Lemma \ref{lemma-normalization-smooth-localization}),
since \'etale morphisms are open, and
since ``being an isomorphism'' is fpqc local on the base
(Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-isomorphism}),
it suffices to prove (a), (b), (c) \'etale locally on $Y$
(some details omitted). Thus
we may assume $Y$ is an affine scheme. This implies that $Y'$ is
an (affine) scheme as well.

\medskip\noindent
Let $x \in |U|$. Claim: there exists an open
neighbourhood $f'(x) \in V \subset Y'$ such that $(f')^{-1}V \to V$ is an
isomorphism. We first prove the claim implies the lemma.
Namely, then $(f')^{-1}V \cong V$ is a scheme (as an open
of $Y'$), locally of finite type over $Y$ (as an open subspace of $X$),
and for $v \in V$ the residue field extension
$\kappa(v)/\kappa(\nu(v))$ is algebraic (as
$V \subset Y'$ and $Y'$ is integral over $Y$). Hence the fibres
of $V \to Y$ are discrete (Morphisms, Lemma
\ref{morphisms-lemma-algebraic-residue-field-extension-closed-point-fibre})
and $(f')^{-1}V \to Y$ is locally quasi-finite
(Morphisms, Lemma \ref{morphisms-lemma-locally-quasi-finite-fibres}).
This implies $(f')^{-1}V \subset U$ and $V \subset U'$. Since $x$ was
arbitrary we see that (a), (b), and (c) are true.

\medskip\noindent
Let $y = f(x) \in |Y|$. Let $(T, t) \to (Y, y)$ be an \'etale morphism
of pointed schemes. Denote by a subscript ${}_T$ the base change to $T$.
Let $z \in X_T$ be a point in the fibre $X_t$ lying over $x$.
Note that $U_T \subset X_T$ is the set of points where $f_T$ is
quasi-finite, see Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-finite-type-quasi-finite-part}.
Note that
$$
X_T \xrightarrow{f'_T} Y'_T \xrightarrow{\nu_T} T
$$
is the normalization of $T$ in $X_T$, see
Lemma \ref{lemma-normalization-smooth-localization}.
Suppose that the claim holds for $z \in U_T \subset X_T \to Y'_T \to T$, i.e.,
suppose that we can find an open neighbourhood
$f'_T(z) \in V' \subset Y'_T$ such that $(f'_T)^{-1}V' \to V'$ is an
isomorphism. The morphism $Y'_T \to Y'$ is \'etale hence the image
$V \subset Y'$ of $V'$ is open. Observe that $f'(x) \in V$ as $f'_T(z) \in V'$.
Observe that
$$
\xymatrix{
(f'_T)^{-1}V' \ar[r] \ar[d] & (f')^{-1}(V) \ar[d] \\
V' \ar[r] & V
}
$$
is a fibre square (as $Y'_T \times_{Y'} X = X_T$).
Since the left vertical arrow is an isomorphism
and $\{V' \to V\}$ is a \'etale covering, we conclude that the right vertical
arrow is an isomorphism by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-isomorphism}.
In other words, the claim holds for $x \in U \subset X \to Y' \to Y$.

\medskip\noindent
By the result of the previous paragraph to prove the claim for
$x \in |U|$, we may replace $Y$ by an \'etale neighbourhood $T$ of
$y = f(x)$ and $x$ by any point lying over $x$ in $T \times_Y X$.
Thus we may assume there is a decomposition
$$
X = V \amalg W
$$
into open and closed subspaces where $V \to Y$ is finite and $x \in V$,
see Lemma \ref{lemma-etale-splits-off-quasi-finite-part}.
Since $X$ is a disjoint union of $V$ and $W$ over $Y$ and since
$V \to Y$ is finite we see that the
normalization of $Y$ in $X$ is the morphism
$$
X = V \amalg W \longrightarrow V \amalg W' \longrightarrow S
$$
where $W'$ is the normalization of $Y$ in $W$, see
Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-normalization-in-disjoint-union},
\ref{spaces-morphisms-lemma-finite-integral}, and
\ref{spaces-morphisms-lemma-normalization-in-integral}.
The claim follows and we win.
\end{proof}

\noindent
The following lemma is a duplicate of
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-finite-separated-quasi-affine}.
The reason for having two copies of the same lemma is that the
proofs are somewhat different. The proof given below
rests on Zariski's Main Theorem for nonrepresentable morphisms of
algebraic spaces as presented above, whereas the proof of
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-finite-separated-quasi-affine}
rests on Morphisms of Spaces, Proposition
\ref{spaces-morphisms-proposition-locally-quasi-finite-separated-over-scheme}
to reduce to the case of morphisms of schemes.

\begin{lemma}
\label{lemma-quasi-finite-separated-quasi-affine}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Assume $f$ is quasi-finite and separated.
Let $Y'$ be the normalization of $Y$ in $X$.
Picture:
$$
\xymatrix{
X \ar[rd]_f \ar[rr]_{f'} & & Y' \ar[ld]^\nu \\
& Y &
}
$$
Then $f'$ is a quasi-compact open immersion and $\nu$ is integral.
In particular $f$ is quasi-affine.
\end{lemma}

\begin{proof}
This follows from Lemma \ref{lemma-finite-type-separated}. Namely, by
that lemma there exists an open subspace $U' \subset Y'$ such that
$(f')^{-1}(U') = X$ (!) and $X \to U'$ is an isomorphism! In other
words, $f'$ is an open immersion. Note that $f'$ is quasi-compact as
$f$ is quasi-compact and $\nu : Y' \to Y$ is separated
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-permanence}).
Hence for every affine scheme $Z$ and morphism $Z \to Y$ the
fibre product $Z \times_Y X$ is a quasi-compact open subscheme
of the affine scheme $Z \times_Y Y'$. Hence $f$ is quasi-affine by
definition.
\end{proof}

\begin{lemma}[Zariski's Main Theorem]
\label{lemma-quasi-finite-separated-pass-through-finite}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Assume $f$ is quasi-finite and separated and assume that
$Y$ is quasi-compact and quasi-separated. Then there exists
a factorization
$$
\xymatrix{
X \ar[rd]_f \ar[rr]_j & & T \ar[ld]^\pi \\
& Y &
}
$$
where $j$ is a quasi-compact open immersion and $\pi$ is finite.
\end{lemma}

\begin{proof}
Let $X \to Y' \to Y$ be as in the conclusion of
Lemma \ref{lemma-quasi-finite-separated-quasi-affine}.
By
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-integral-algebra-directed-colimit-finite}
we can write
$\nu_*\mathcal{O}_{Y'} = \colim_{i \in I} \mathcal{A}_i$ as a
directed colimit of finite quasi-coherent $\mathcal{O}_X$-algebras
$\mathcal{A}_i \subset \nu_*\mathcal{O}_{Y'}$. Then
$\pi_i : T_i = \underline{\Spec}_Y(\mathcal{A}_i) \to Y$
is a finite morphism for each $i$.
Note that the transition morphisms $T_{i'} \to T_i$ are affine
and that $Y' = \lim T_i$.

\medskip\noindent
By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-opens}
there exists an $i$ and a quasi-compact open
$U_i \subset T_i$ whose inverse image in $Y'$ equals
$f'(X)$. For $i' \geq i$ let $U_{i'}$ be the inverse image
of $U_i$ in $T_{i'}$. Then $X \cong f'(X) = \lim_{i' \geq i} U_{i'}$, see
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-directed-inverse-system-has-limit}.
By
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-finite-type-eventually-closed} we see that
$X \to U_{i'}$ is a closed immersion for some $i' \geq i$.
(In fact $X \cong U_{i'}$ for sufficiently
large $i'$ but we don't need this.) Hence $X \to T_{i'}$ is an immersion. By
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-factor-the-other-way}
we can factor this as $X \to T \to T_{i'}$ where the first arrow
is an open immersion and the second a closed immersion. Thus we win.
\end{proof}

\begin{lemma}
\label{lemma-quasi-finite-separated-pass-through-finite-addendum}
With notation and hypotheses as in
Lemma \ref{lemma-quasi-finite-separated-pass-through-finite}.
Assume moreover that $f$ is locally of finite presentation. Then we can
choose the factorization such that $T$ is finite and of
finite presentation over $Y$.
\end{lemma}

\begin{proof}
By Limits of Spaces, Lemma
\ref{spaces-limits-lemma-finite-in-finite-and-finite-presentation} we can write
$T = \lim T_i$ where all $T_i$ are finite and of finite presentation
over $Y$ and the transition morphisms $T_{i'} \to T_i$ are closed
immersions. By
Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-opens}
there exists an $i$ and an open subscheme $U_i \subset T_i$ whose inverse
image in $T$ is $X$. By
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-finite-type-eventually-closed}
we see that $X \cong U_i$ for large enough $i$.
Replacing $T$ by $T_i$ finishes the proof.
\end{proof}












\section{Applications of Zariski's Main Theorem, I}
\label{section-applications-zmt}

\noindent
A first application is the characterization of finite
morphisms as proper morphisms with finite fibres.

\begin{lemma}
\label{lemma-characterize-finite}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. The following are equivalent:
\begin{enumerate}
\item $f$ is finite,
\item $f$ is proper and locally quasi-finite,
\item $f$ is proper and $|X_k|$ is a discrete space for every morphism
$\Spec(k) \to Y$ where $k$ is a field,
\item $f$ is universally closed, separated, locally of finite type
and $|X_k|$ is a discrete space for every morphism $\Spec(k) \to Y$
where $k$ is a field.
\end{enumerate}
\end{lemma}

\begin{proof}
We have (1) $\Rightarrow$ (2) by
Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-finite-proper},
\ref{spaces-morphisms-lemma-finite-quasi-finite}.
We have (2) $\Rightarrow$ (3) by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-quasi-finite}.
By definition (3) implies (4).

\medskip\noindent
Assume (4). Since $f$ is universally closed it is quasi-compact
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-quasi-compact}).
Pick a point $y$ of $|Y|$. We represent $y$ by a
morphism $\Spec(k) \to Y$. Note that $|X_k|$ is finite discrete
as a quasi-compact discrete space. The map $|X_k| \to |X|$ surjects
onto the fibre of $|X| \to |Y|$ over $y$
(Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian}).
By
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-finite-at-point}
we see that $X \to Y$ is quasi-finite at all the points of the fibre
of $|X| \to |Y|$ over $y$.
Choose an elementary \'etale neighbourhood $(U, u) \to (Y, y)$
and decomposition $X_U = V \amalg W$ as in
Lemma \ref{lemma-etale-splits-off-quasi-finite-part}
adapted to all the points of $|X|$ lying over $y$.
Note that $W_u = \emptyset$ because we used all the points
in the fibre of $|X| \to |Y|$ over $y$.
Since $f$ is universally closed we see that
the image of $|W|$ in $|U|$ is a closed set not containing $u$.
After shrinking $U$ we may assume that $W = \emptyset$.
In other words we see that $X_U = V$ is finite over $U$.
Since $y \in |Y|$ was arbitrary
this means there exists a family $\{U_i \to Y\}$
of \'etale morphisms whose images cover $Y$ such that
the base changes $X_{U_i} \to U_i$ are finite.
We conclude that $f$ is finite by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-integral-local}.
\end{proof}

\noindent
As a consequence we have the following useful result.

\begin{lemma}
\label{lemma-proper-finite-fibre-finite-in-neighbourhood}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Let $y \in |Y|$. Assume
\begin{enumerate}
\item $f$ is proper, and
\item $f$ is quasi-finite at all $x \in |X|$ lying over $y$
(Decent Spaces, Lemma \ref{decent-spaces-lemma-conditions-on-fibre-and-qf}).
\end{enumerate}
Then there exists an open neighbourhood $V \subset Y$ of $y$
such that $f|_{f^{-1}(V)} : f^{-1}(V) \to V$ is finite.
\end{lemma}

\begin{proof}
By
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-finite-type-quasi-finite-part} the
set of points at which $f$ is quasi-finite is an open $U \subset X$.
Let $Z = X \setminus U$. Then $y \not \in f(Z)$. Since $f$ is proper
the set $f(Z) \subset Y$ is closed. Choose any open neighbourhood
$V \subset Y$ of $y$ with $Z \cap V = \emptyset$. Then
$f^{-1}(V) \to V$ is locally quasi-finite and proper.
Hence $f^{-1}(V) \to V$ is finite by Lemma \ref{lemma-characterize-finite}.
\end{proof}

\begin{lemma}
\label{lemma-flat-proper-family-cannot-collapse-fibre}
\begin{slogan}
Collapsing a fibre of a proper family forces nearby ones to collapse too.
\end{slogan}
Let $S$ be a scheme. Let
$$
\xymatrix{
X \ar[rr]_h \ar[rd]_f & & Y \ar[ld]^g \\
& B
}
$$
be a commutative diagram of morphism of algebraic spaces over $S$.
Let $b \in B$ and let $\Spec(k) \to B$ be a morphism in the equivalence
class of $b$. Assume
\begin{enumerate}
\item $X \to B$ is a proper morphism,
\item $Y \to B$ is separated and locally of finite type,
\item one of the following is true
\begin{enumerate}
\item the image of $|X_k| \to |Y_k|$ is finite,
\item the image of $|f|^{-1}(\{b\})$ in $|Y|$ is finite
and $B$ is decent.
\end{enumerate}
\end{enumerate}
Then there is an open
subspace $B' \subset B$ containing $b$ such that $X_{B'} \to Y_{B'}$
factors through a closed subspace $Z \subset Y_{B'}$ finite over $B'$.
\end{lemma}

\begin{proof}
Let $Z \subset Y$ be the scheme theoretic image of $h$, see
Morphisms of Spaces, Section
\ref{spaces-morphisms-section-scheme-theoretic-image}.
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-scheme-theoretic-image-is-proper}
the morphism $X \to Z$ is surjective and $Z \to B$ is proper.
Thus
$$
\{x \in |X|\text{ lying over }b\} \to
\{z \in |Z|\text{ lying over }b\}
$$
and $|X_k| \to |Z_k|$ are surjective. We see that either
(3)(a) or (3)(b) imply that $Z \to B$ is quasi-finite
all points of $|Z|$ lying over $b$ by
Decent Spaces, Lemma \ref{decent-spaces-lemma-conditions-on-fibre-and-qf}.
Hence $Z \to B$ is finite in an open neighbourhood of $b$ by
Lemma \ref{lemma-proper-finite-fibre-finite-in-neighbourhood}.
\end{proof}







\section{Stein factorization}
\label{section-stein-factorization}

\noindent
Stein factorization is the statement that a proper morphism $f : X \to S$
with $f_*\mathcal{O}_X = \mathcal{O}_S$ has connected fibres.

\begin{lemma}
\label{lemma-stein-universally-closed}
Let $S$ be a scheme. Let $f : X \to Y$ be a universally closed and
quasi-separated morphism of algebraic spaces over $S$.
There exists a factorization
$$
\xymatrix{
X \ar[rr]_{f'} \ar[rd]_f & & Y' \ar[dl]^\pi \\
& Y &
}
$$
with the following properties:
\begin{enumerate}
\item the morphism $f'$ is universally closed, quasi-compact, quasi-separated,
and surjective,
\item the morphism $\pi : Y' \to Y$ is integral,
\item we have $f'_*\mathcal{O}_X = \mathcal{O}_{Y'}$,
\item we have $Y' = \underline{\Spec}_Y(f_*\mathcal{O}_X)$, and
\item $Y'$ is the normalization of $Y$ in $X$ as defined in
Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-normalization-X-in-Y}.
\end{enumerate}
Formation of the factorization $f = \pi \circ f'$ commutes with flat
base change.
\end{lemma}

\begin{proof}
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-quasi-compact}
the morphism $f$ is quasi-compact.
We just define $Y'$ as the normalization of $Y$ in $X$, so (5) and (2) hold
automatically. By
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-normalization-in-universally-closed}
we see that (4) holds. The morphism $f'$ is universally closed by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-permanence}.
It is quasi-compact by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-permanence}
and quasi-separated by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-compose-after-separated}.

\medskip\noindent
To show the remaining statements we may assume the base $Y$ is affine
(as taking normalization commutes with \'etale localization).
Say $Y = \Spec(R)$. Then $Y' = \Spec(A)$ with
$A = \Gamma(X, \mathcal{O}_X)$ an integral $R$-algebra.
Thus it is clear that $f'_*\mathcal{O}_X$
is $\mathcal{O}_{Y'}$ (because $f'_*\mathcal{O}_X$ is quasi-coherent,
by Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-pushforward},
and hence equal to $\widetilde{A}$). This proves (3).

\medskip\noindent
Let us show that $f'$ is surjective. As $f'$ is universally closed (see above)
the image of $f'$ is a closed subset
$V(I) \subset Y' = \Spec(A)$. Pick $h \in I$. Then
$h|_X = f^\sharp(h)$ is a global section of the structure sheaf of
$X$ which vanishes at every point. As $X$ is quasi-compact this means
that $h|_X$ is a nilpotent section, i.e., $h^n|X = 0$ for some $n > 0$.
But $A = \Gamma(X, \mathcal{O}_X)$, hence $h^n = 0$.
In other words $I$ is contained in the Jacobson radical of $A$ and we conclude
that $V(I) = Y'$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-stein-universally-closed-residue-fields}
In Lemma \ref{lemma-stein-universally-closed} assume in addition that
$f$ is locally of finite type and $Y$ affine. Then for $y \in Y$ the fibre
$\pi^{-1}(\{y\}) = \{y_1, \ldots, y_n\}$ is finite and the field extensions
$\kappa(y_i)/\kappa(y)$ are finite.
\end{lemma}

\begin{proof}
Recall that there are no specializations among the points of $\pi^{-1}(\{y\})$,
see Algebra, Lemma \ref{algebra-lemma-integral-no-inclusion}.
As $f'$ is surjective, we find that $|X_y| \to \pi^{-1}(\{y\})$ is surjective.
Observe that $X_y$ is a quasi-separated algebraic space of finite type
over a field (quasi-compactness was shown in the proof of the
referenced lemma). Thus $|X_y|$ is a Noetherian topological space
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-finite-presentation-noetherian}).
A topological argument (omitted) now shows that $\pi^{-1}(\{y\})$ is finite.
For each $i$ we can pick a finite type point $x_i \in |X_y|$
mapping to $y_i$ (Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-enough-finite-type-points}).
We conclude that $\kappa(y_i)/\kappa(y)$ is finite:
$x_i$ can be represented by a morphism $\Spec(k_i) \to X_y$
of finite type (by our definition of finite type points)
and hence $\Spec(k_i) \to y = \Spec(\kappa(y))$ is of finite type
(as a composition of finite type morphisms),
hence $k_i/\kappa(y)$ is finite (Morphisms, Lemma
\ref{morphisms-lemma-point-finite-type}).
\end{proof}

\noindent
Let $f : X \to Y$ be a morphism of algebraic spaces and let
$\overline{y} : \Spec(k) \to Y$ be a geometric point. Then the
{\it fibre of $f$ over $\overline{y}$} is the algebraic space
$X_{\overline{y}} = X \times_{Y, \overline{y}} \Spec(k)$ over $k$.
If $Y$ is a scheme and $y \in Y$ is a point, then we denote
$X_y = X \times_Y \Spec(\kappa(y))$ the fibre as usual.

\begin{lemma}
\label{lemma-characterize-geometrically-connected-fibres}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Let $\overline{y}$ be a geometric point of $Y$. Then
$X_{\overline{y}}$ is connected, if and only if for every \'etale
neighbourhood $(V, \overline{v}) \to (Y, \overline{y})$ where $V$
is a scheme the base change $X_V \to V$ has connected fibre $X_v$.
\end{lemma}

\begin{proof}
Since the category of \'etale neighbourhoods of $\overline{y}$ is
cofiltered and contains a cofinal collection of schemes
(Properties of Spaces, Lemma \ref{spaces-properties-lemma-cofinal-etale})
we may replace $Y$ by one of these neighbourhoods and assume that
$Y$ is a scheme. Let $y \in Y$ be the point corresponding to $\overline{y}$.
Then $X_y$ is geometrically connected over $\kappa(y)$ if and only if
$X_{\overline{y}}$ is connected and if and only if $(X_y)_{k'}$
is connected for every finite separable extension $k'$ of $\kappa(y)$.
See Spaces over Fields, Section
\ref{spaces-over-fields-section-geometrically-connected} and especially
Lemma \ref{spaces-over-fields-lemma-characterize-geometrically-disconnected}.
By More on Morphisms, Lemma
\ref{more-morphisms-lemma-realize-prescribed-residue-field-extension-etale}
there exists an affine \'etale neighbourhood $(V, v) \to (Y, y)$ such that
$\kappa(s) \subset \kappa(u)$ is identified with $\kappa(s) \subset k'$
any given finite separable extension. The lemma follows.
\end{proof}

\begin{theorem}[Stein factorization; Noetherian case]
\label{theorem-stein-factorization-Noetherian}
Let $S$ be a scheme. Let $f : X \to Y$ be a proper morphism of algebraic
spaces over $S$ with $Y$ locally Noetherian.
There exists a factorization
$$
\xymatrix{
X \ar[rr]_{f'} \ar[rd]_f & & Y' \ar[dl]^\pi \\
& Y &
}
$$
with the following properties:
\begin{enumerate}
\item the morphism $f'$ is proper with connected geometric fibres,
\item the morphism $\pi : Y' \to Y$ is finite,
\item we have $f'_*\mathcal{O}_X = \mathcal{O}_{Y'}$,
\item we have $Y' = \underline{\Spec}_Y(f_*\mathcal{O}_X)$, and
\item $Y'$ is the normalization of $Y$ in $X$, see
Morphisms, Definition \ref{morphisms-definition-normalization-X-in-Y}.
\end{enumerate}
\end{theorem}

\begin{proof}
Let $f = \pi \circ f'$ be the factorization of
Lemma \ref{lemma-stein-universally-closed}. Note that besides the
conclusions of Lemma \ref{lemma-stein-universally-closed} we
also have that $f'$ is separated
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-compose-after-separated})
and finite type
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-permanence-finite-type}).
Hence $f'$ is proper. By
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-proper-pushforward-coherent}
we see that $f_*\mathcal{O}_X$ is a coherent $\mathcal{O}_Y$-module.
Hence we see that $\pi$ is finite, i.e., (2) holds.

\medskip\noindent
This proves all but the most interesting assertion, namely that
the geometric fibres of $f'$ are connected. It is clear from the
discussion above that we may replace $Y$ by $Y'$. 
Then $Y$ is locally Noetherian,
$f : X \to Y$ is proper, and $f_*\mathcal{O}_X = \mathcal{O}_Y$.
Let $\overline{y}$ be a geometric point of $Y$.
At this point we apply the theorem on formal functions,
more precisely Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-formal-functions-stalk}.
It tells us that
$$
\mathcal{O}^\wedge_{Y, \overline{y}} =
\lim_n H^0(X_n, \mathcal{O}_{X_n})
$$
where $X_n =
\Spec(\mathcal{O}_{Y, \overline{y}}/\mathfrak m_{\overline{y}}^n) \times_Y X$.
Note that $X_1 = X_{\overline{y}} \to X_n$ is a (finite order) thickening
and hence the underlying topological space of $X_n$ is equal to that
of $X_{\overline{y}}$. Thus, if $X_{\overline{y}} = T_1 \amalg T_2$
is a disjoint union of nonempty open and closed subspaces, then similarly
$X_n = T_{1, n} \amalg T_{2, n}$ for all $n$. And this in turn means
$H^0(X_n, \mathcal{O}_{X_n})$ contains a nontrivial idempotent $e_{1, n}$,
namely the function which is identically $1$ on $T_{1, n}$ and
identically $0$ on $T_{2, n}$. It is clear that $e_{1, n + 1}$
restricts to $e_{1, n}$ on $X_n$. Hence $e_1 = \lim e_{1, n}$
is a nontrivial idempotent of the limit. This contradicts the fact
that $\mathcal{O}^\wedge_{Y, \overline{y}}$ is a local ring. Thus the
assumption was wrong, i.e., $X_{\overline{y}}$ is connected
as desired.
\end{proof}

\begin{theorem}[Stein factorization; general case]
\label{theorem-stein-factorization-general}
Let $S$ be a scheme. Let $f : X \to Y$ be a proper morphism of algebraic
spaces over $S$. There exists a factorization
$$
\xymatrix{
X \ar[rr]_{f'} \ar[rd]_f & & Y' \ar[dl]^\pi \\
& Y &
}
$$
with the following properties:
\begin{enumerate}
\item the morphism $f'$ is proper with connected geometric fibres,
\item the morphism $\pi : Y' \to Y$ is integral,
\item we have $f'_*\mathcal{O}_X = \mathcal{O}_{Y'}$,
\item we have $Y' = \underline{\Spec}_Y(f_*\mathcal{O}_X)$, and
\item $Y'$ is the normalization of $Y$ in $X$ (Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-normalization-X-in-Y}).
\end{enumerate}
\end{theorem}

\begin{proof}
We may apply Lemma \ref{lemma-stein-universally-closed} to get the
morphism $f' : X \to Y'$.
Note that besides the
conclusions of Lemma \ref{lemma-stein-universally-closed} we
also have that $f'$ is separated
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-compose-after-separated})
and finite type
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-permanence-finite-type}).
Hence $f'$ is proper. At this point we have proved all of the
statements except for the statement
that $f'$ has connected geometric fibres.

\medskip\noindent
It is clear from the discussion that we may replace $Y$ by $Y'$. 
Then $f : X \to Y$ is proper and $f_*\mathcal{O}_X = \mathcal{O}_Y$.
Note that these conditions are preserved under flat base change
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-proper}
and
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-flat-base-change-cohomology}).
Let $\overline{y}$ be a geometric point of $Y$. By
Lemma \ref{lemma-characterize-geometrically-connected-fibres}
and the remark just made we reduce to the case where $Y$ is a
scheme, $y \in Y$ is a point, $f : X \to Y$ is a proper algebraic
space over $Y$ with $f_*\mathcal{O}_X = \mathcal{O}_Y$,
and we have to show the fibre $X_y$ is connected.
Replacing $Y$ by an affine neighbourhood of $y$ we may
assume that $Y = \Spec(R)$ is affine. Then $f_*\mathcal{O}_X = \mathcal{O}_Y$
signifies that the ring map
$R \to \Gamma(X, \mathcal{O}_X)$ is bijective.

\medskip\noindent
By Limits of Spaces, Lemma
\ref{spaces-limits-lemma-proper-limit-of-proper-finite-presentation-noetherian}
we can write $(X \to Y) = \lim (X_i \to Y_i)$ with $X_i \to Y_i$
proper and of finite presentation and $Y_i$ Noetherian. For $i$ large
enough $Y_i$ is affine (Limits of Spaces, Lemma
\ref{spaces-limits-lemma-limit-is-affine}).
Say $Y_i = \Spec(R_i)$. Let $R'_i = \Gamma(X_i, \mathcal{O}_{X_i})$.
Observe that we have ring maps $R_i \to R_i' \to R$. Namely, we have
the first because $X_i$ is an algebraic space over $R_i$ and the second because
we have $X \to X_i$ and $R = \Gamma(X, \mathcal{O}_X)$. Note that
$R = \colim R'_i$ by Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-section}.
Then 
$$
\xymatrix{
X \ar[d]  \ar[r] & X_i \ar[d] \\
Y \ar[r] & Y'_i \ar[r] & Y_i
}
$$
is commutative with $Y'_i = \Spec(R'_i)$.
Let $y'_i \in Y'_i$ be the image of $y$.
We have $X_y = \lim X_{i, y'_i}$ because $X = \lim X_i$,
$Y = \lim Y'_i$, and $\kappa(y) = \colim \kappa(y'_i)$.
Now let $X_y = U \amalg V$ with $U$ and $V$ open and closed.
Then $U, V$ are the inverse images of opens $U_i, V_i$ in $X_{i, y'_i}$
(Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-opens}).
By Theorem \ref{theorem-stein-factorization-Noetherian} the fibres
of $X_i \to Y'_i$ are connected, hence either $U$ or $V$ is empty.
This finishes the proof.
\end{proof}

\noindent
Here is an application.

\begin{lemma}
\label{lemma-geometrically-connected-fibres-towards-normal}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic
spaces over $S$. Assume
\begin{enumerate}
\item $f$ is proper,
\item $Y$ is integral (Spaces over Fields, Definition
\ref{spaces-over-fields-definition-integral-algebraic-space})
with generic point $\xi$,
\item $Y$ is normal,
\item $X$ is reduced,
\item every generic point of an irreducible component of $|X|$ maps to $\xi$,
\item we have $H^0(X_\xi, \mathcal{O}) = \kappa(\xi)$.
\end{enumerate}
Then $f_*\mathcal{O}_X = \mathcal{O}_Y$ and $f$
has geometrically connected fibres.
\end{lemma}

\begin{proof}
Apply Theorem \ref{theorem-stein-factorization-general} to get a
factorization $X \to Y' \to Y$. It is enough to show that $Y' = Y$.
It suffices to show that $Y' \times_Y V \to V$ is an isomorphism,
where $V \to Y$ is an \'etale morphism and $V$ an affine integral scheme,
see Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-normal-integral-cover-by-affines}.
The formation of $Y'$ commutes with \'etale base change, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-properties-normalization}.
The generic points of $X \times_Y V$ lie over the generic points of $X$
(Decent Spaces, Lemma \ref{decent-spaces-lemma-decent-generic-points})
hence map to the generic point of $V$ by assumption (5). Moreover, condition
(6) is preserved under the base change by $V \to Y$, for example by
flat base change (Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-flat-base-change-cohomology}).
Thus it suffices to prove the lemma in case $Y$ is a normal
integral affine scheme.

\medskip\noindent
Assume $Y$ is a normal integral affine scheme. We will show $Y' \to Y$
is an isomorphism by an application of Morphisms, Lemma
\ref{morphisms-lemma-finite-birational-over-normal}.
Namely, $Y'$ is reduced because $X$ is reduced (Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-normalization-in-reduced}).
The morphism $Y' \to Y$ is integral by the theorem cited above.
Since $Y$ is decent and $X \to Y$ is separated, we see that
$X$ is decent too; to see this use
Decent Spaces, Lemmas
\ref{decent-spaces-lemma-properties-trivial-implications} and
\ref{decent-spaces-lemma-property-over-property}. By assumption (5),
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-normalization-generic},
and Decent Spaces, Lemma \ref{decent-spaces-lemma-decent-generic-points}
we see that every generic point of an irreducible component of $|Y'|$
maps to $\xi$. On the other hand, since $Y'$ is the relative
spectrum of $f_*\mathcal{O}_X$ we see that the scheme theoretic fibre
$Y'_\xi$ is the spectrum of $H^0(X_\xi, \mathcal{O})$ which is
equal to $\kappa(\xi)$ by assumption. Hence $Y'$ is an integral
scheme with function field equal to the function field of $Y$.
This finishes the proof.
\end{proof}

\noindent
Here is another application.

\begin{lemma}
\label{lemma-proper-flat-nr-geom-conn-comps-lower-semicontinuous}
Let $S$ be a scheme.
Let $X \to Y$ be a morphism of algebraic spaces over $S$.
If $f$ is proper, flat, and of finite presentation, then the function
$n_{X/Y} : |Y| \to \mathbf{Z}$ counting the number of geometric
connected components of fibres of $f$
(Lemma \ref{lemma-base-change-fibres-nr-geometrically-connected-components})
is lower semi-continuous.
\end{lemma}

\begin{proof}
The question is \'etale local on $Y$, hence we may and do assume $Y$
is an affine scheme. Let $y \in Y$. Set $n = n_{X/S}(y)$.
Note that $n < \infty$ as the geometric fibre of $X \to Y$ at $y$
is a proper algebraic space over a field, hence Noetherian, hence
has a finite number of connected components.
We have to find an open neighbourhood $V$ of $y$ such that $n_{X/S}|_V \geq n$.
Let $X \to Y' \to Y$ be the Stein factorization as in
Theorem \ref{theorem-stein-factorization-general}.
By Lemma \ref{lemma-stein-universally-closed-residue-fields}
there are finitely many points
$y'_1, \ldots, y'_m \in Y'$ lying over $y$
and the extensions $\kappa(y'_i)/\kappa(y)$ are finite.
More on Morphisms, Lemma \ref{more-morphisms-lemma-etale-makes-integral-split}
tells us that after replacing $Y$ by an \'etale neighbourhood
of $y$ we may assume $Y' = V_1 \amalg \ldots \amalg V_m$ as a scheme
with $y'_i \in V_i$ and $\kappa(y'_i)/\kappa(y)$ purely inseparable.
Then the algebraic spaces $X_{y_i'}$ are geometrically connected over
$\kappa(y)$, hence $m = n$. The algebraic spaces
$X_i = (f')^{-1}(V_i)$, $i = 1, \ldots, n$
are flat and of finite presentation over $Y$. Hence the image of $X_i \to Y$
is open (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-fppf-open}).
Thus in a neighbourhood of $y$ we see that $n_{X/Y}$ is
at least $n$.
\end{proof}

\begin{lemma}
\label{lemma-proper-flat-geom-red}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$. Assume
\begin{enumerate}
\item $f$ is proper, flat, and of finite presentation, and
\item the geometric fibres of $f$ are reduced.
\end{enumerate}
Then the function $n_{X/S} : |Y| \to \mathbf{Z}$
counting the numbers of geometric connected components
of fibres of $f$
(Lemma \ref{lemma-base-change-fibres-nr-geometrically-connected-components})
is locally constant.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-proper-flat-nr-geom-conn-comps-lower-semicontinuous}
the function $n_{X/Y}$ is lower semincontinuous.
Thus it suffices to show it is upper semi-continuous.
To do this we may work \'etale locally on $Y$, hence we
may assume $Y$ is an affine scheme.
For $y \in Y$ consider the $\kappa(y)$-algebra
$$
A = H^0(X_y, \mathcal{O}_{X_y})
$$
By Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-proper-geometrically-reduced-global-sections}
and the fact that $X_y$ is geometrically reduced
$A$ is finite product of finite separable extensions of $\kappa(y)$.
Hence $A \otimes_{\kappa(y)} \kappa(\overline{y})$ is a product
of $\beta_0(y) = \dim_{\kappa(y)} A$ copies of $\kappa(\overline{y})$.
Thus $X_{\overline{y}}$ has $\beta_0(y)$ connected components.
In other words, we have $n_{X/S} = \beta_0$ as functions on $Y$.
Thus $n_{X/Y}$ is upper semi-continuous by
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-jump-loci-geometric}.
This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-stein-factorization-etale}
Let $S$ be a scheme.
Let $f : X \to Y$ be a proper morphism of algebraic spaces over $S$.
Let $X \to Y' \to Y$ be the Stein factorization of $f$
(Theorem \ref{theorem-stein-factorization-general}).
If $f$ is of finite presentation, flat, with geometrically
reduced fibres (Definition \ref{definition-geometrically-reduced-fibre}),
then $Y' \to Y$ is finite \'etale.
\end{lemma}

\begin{proof}
Formation of the Stein factorization commutes with flat base change,
see Lemma \ref{lemma-stein-universally-closed}.
Thus we may work \'etale locally on $Y$ and we may assume $Y$
is an affine scheme. Then $Y'$ is an affine scheme and $Y' \to Y$
is integral.

\medskip\noindent
Let $y \in Y$. Set $n$ be the number of connected components of
the geometric fibre $X_{\overline{y}}$. Note that $n < \infty$
as the geometric fibre of $X \to Y$ at $y$ is a proper
algebraic space over a field, hence Noetherian,
hence has a finite number of connected components.
By Lemma \ref{lemma-stein-universally-closed-residue-fields}
there are finitely many points $y'_1, \ldots, y'_m \in Y'$ lying over $y$
and for each $i$ we can pick a finite type point $x_i \in |X_y|$
mapping to $y'_i$ the extension $\kappa(y'_i)/\kappa(y)$ is finite.
Thus More on Morphisms,
Lemma \ref{more-morphisms-lemma-etale-makes-integral-split}
tells us that after replacing $Y$ by an \'etale neighbourhood
of $y$ we may assume $Y' = V_1 \amalg \ldots \amalg V_m$ as a scheme
with $y'_i \in V_i$ and $\kappa(y'_i)/\kappa(y)$ purely inseparable.
In this case the algebraic spaces $X_{y_i'}$
are geometrically connected over $\kappa(y)$, hence $m = n$.
The algebraic spaces $X_i = (f')^{-1}(V_i)$, $i = 1, \ldots, n$
are proper, flat, of finite presentation, with geometrically
reduced fibres over $Y$. It suffices to prove the lemma
for each of the morphisms $X_i \to Y$. This reduces us to the case where
$X_{\overline{y}}$ is connected.

\medskip\noindent
Assume that $X_{\overline{y}}$ is connected. By
Lemma \ref{lemma-proper-flat-geom-red}
we see that $X \to Y$ has geometrically connected
fibres in a neighbourhood of $y$. Thus
we may assume the fibres of $X \to Y$ are geometrically connected.
Then $f_*\mathcal{O}_X = \mathcal{O}_Y$ by
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-proper-flat-geom-red-connected}
which finishes the proof.
\end{proof}

\noindent
The proof of the following lemma uses Stein factorization for schemes
which is why it ended up in this section.

\begin{lemma}
\label{lemma-split-off-proper-part-henselian}
Let $(A, I)$ be a henselian pair. Let $X$ be an algebraic space
separated and of finite type over $A$. Set
$X_0 = X \times_{\Spec(A)} \Spec(A/I)$.
Let $Y \subset X_0$ be an open and closed subspace such that
$Y \to \Spec(A/I)$ is proper. Then there exists an open and closed
subspace $W \subset X$ which is proper over $A$ with
$W \times_{\Spec(A)} \Spec(A/I) = Y$.
\end{lemma}

\begin{proof}
We will denote $T \mapsto T_0$ the base change by
$\Spec(A/I) \to \Spec(A)$.
By a weak version of Chow's lemma (in the form of
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-weak-chow})
there exists a surjective proper morphism $\varphi : X' \to X$ such
that $X'$ admits an immersion into $\mathbf{P}^n_A$.
Set $Y' = \varphi^{-1}(Y)$. This is an open and closed subscheme
of $X'_0$. The lemma holds for $(X', Y')$ by
More on Morphisms, Lemma
\ref{more-morphisms-lemma-split-off-proper-part-henselian}.
Let $W' \subset X'$ be the open and closed subscheme proper
over $A$ such that $Y' = W'_0$.
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-permanence}
$Q_1 = \varphi(|W'|) \subset |X|$ and
$Q_2 = \varphi(|X' \setminus W'|) \subset |X|$
are closed subsets and by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-image-proper-is-proper}
any closed subspace structure on $Q_1$ is proper over $A$.
The image of $Q_1 \cap Q_2$ in $\Spec(A)$ is closed.
Since $(A, I)$ is henselian, if $Q_1 \cap Q_2$ is nonempty, then we
find that $Q_1 \cap Q_2$ has a point lying over $\Spec(A/I)$.
This is impossible as $W'_0 = Y' = \varphi^{-1}(Y)$.
We conclude that $Q_1$ is open and closed in $|X|$.
Let $W \subset X$ be the corresponding open and closed
subspace. Then $W$ is proper over $A$ with $W_0 = Y$.
\end{proof}










\section{Extending properties from an open}
\label{section-extending-properties}

\noindent
In this section we collect a number of results of the form: If $f : X \to Y$
is a flat morphism of algebraic spaces and $f$ satisfies some property over
a dense
open of $Y$, then $f$ satisfies the same property over all of $Y$.

\begin{lemma}
\label{lemma-flat-finite-type-finitely-presented-over-dense-open}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $\mathcal{F}$ be a quasi-coherent $\mathcal{O}_X$-module.
Let $V \subset Y$ be an open subspace. Assume
\begin{enumerate}
\item $f$ is locally of finite presentation,
\item $\mathcal{F}$ is of finite type and flat over $Y$,
\item $V \to Y$ is quasi-compact and scheme theoretically dense,
\item $\mathcal{F}|_{f^{-1}V}$ is of finite presentation.
\end{enumerate}
Then $\mathcal{F}$ is of finite presentation.
\end{lemma}

\begin{proof}
It suffices to prove the pullback of $\mathcal{F}$ to a scheme surjective
and \'etale over $X$ is of finite presentation. Hence we may assume $X$
is a scheme. Similarly, we can replace $Y$ by a scheme surjective and
\'etale and over $Y$ (the inverse image of $V$ in this scheme is scheme
theoretically dense, see
Morphisms of Spaces, Section
\ref{spaces-morphisms-section-scheme-theoretic-closure}).
Thus we reduce to the case of schemes which is
More on Flatness, Lemma
\ref{flat-lemma-flat-finite-type-finitely-presented-over-dense-open}.
\end{proof}

\begin{lemma}
\label{lemma-flat-finite-type-finitely-presented-over-dense-open-X}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $V \subset Y$ be an open subspace.
Assume
\begin{enumerate}
\item $f$ is locally of finite type and flat,
\item $V \to Y$ is quasi-compact and scheme theoretically dense,
\item $f|_{f^{-1}V} : f^{-1}V \to V$ is locally of finite presentation.
\end{enumerate}
Then $f$ is of locally of finite presentation.
\end{lemma}

\begin{proof}
The proof is identical to the proof of
Lemma \ref{lemma-flat-finite-type-finitely-presented-over-dense-open}
except one uses
More on Flatness, Lemma
\ref{flat-lemma-flat-finite-type-finitely-presented-over-dense-open-X}.
\end{proof}

\begin{lemma}
\label{lemma-flat-fp-dimension-over-dense-open}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$ which is flat and locally of finite type. Let $V \subset Y$ be an
open subspace such that $|V| \subset |Y|$ is dense and such that $X_V \to V$
has relative dimension $\leq d$. If also either
\begin{enumerate}
\item $f$ is locally of finite presentation, or
\item $V \to Y$ is quasi-compact,
\end{enumerate}
then $f : X \to Y$ has relative dimension $\leq d$.
\end{lemma}

\begin{proof}
We may replace $Y$ by its reduction, hence we may assume $Y$ is reduced.
Then $V$ is scheme theoretically dense in $Y$, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-immersion}.
By definition the property of having relative dimension $\leq d$ can
be checked on an \'etale covering, see
Morphisms of Spaces, Sections \ref{spaces-morphisms-section-relative-dimension}.
Thus it suffices to prove $f$ has relative dimension $\leq d$
after replacing $X$ by a scheme surjective and \'etale over $X$.
Similarly, we can replace $Y$ by a scheme surjective and
\'etale and over $Y$. The inverse image of $V$ in this scheme is scheme
theoretically dense, see
Morphisms of Spaces, Section
\ref{spaces-morphisms-section-scheme-theoretic-closure}.
Since a scheme theoretically dense open of a scheme is in particular
dense, we reduce to the case of schemes which is
More on Flatness, Lemma
\ref{flat-lemma-flat-finite-presentation-dimension-over-dense-open}.
\end{proof}

\begin{lemma}
\label{lemma-proper-flat-finite-over-dense-open}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$ which is flat and proper. Let $V \to Y$ be an open subspace
with $|V| \subset |Y|$ dense such that $X_V \to V$ is finite. If also
either $f$ is locally of finite presentation or $V \to Y$ is quasi-compact,
then $f$ is finite.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-flat-fp-dimension-over-dense-open}
the fibres of $f$ have dimension zero.
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-quasi-finite-rel-dimension-0}
this implies that $f$ is locally quasi-finite.
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-quasi-finite-separated-representable}
this implies that $f$ is representable.
We can check whether $f$ is finite \'etale locally on $Y$,
hence we may assume $Y$ is a scheme. Since  $f$ is representable,
we reduce to the case of schemes which is
More on Flatness, Lemma \ref{flat-lemma-proper-flat-finite-over-dense-open}.
\end{proof}

\begin{lemma}
\label{lemma-zariski}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $V \subset Y$ be an open subspace. If
\begin{enumerate}
\item $f$ is separated, locally of finite type, and flat,
\item $f^{-1}(V) \to V$ is an isomorphism, and
\item $V \to Y$ is quasi-compact and scheme theoretically dense,
\end{enumerate}
then $f$ is an open immersion.
\end{lemma}

\begin{proof}
Applying
Lemma \ref{lemma-flat-finite-type-finitely-presented-over-dense-open-X}
we see that $f$ is locally of finite presentation. Applying
Lemma \ref{lemma-flat-fp-dimension-over-dense-open}
we see that $f$ has relative dimension $\leq 0$.
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-quasi-finite-rel-dimension-0}
this implies that $f$ is locally quasi-finite.
By Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-quasi-finite-separated-representable}
this implies that $f$ is representable.
By Descent on Spaces, Lemma
\ref{spaces-descent-lemma-descending-property-open-immersion}
we can check whether $f$ is an open immersion \'etale locally on $Y$.
Hence we may assume that $Y$ is a scheme. Since $f$ is representable,
we reduce to the case of schemes which is
More on Flatness, Lemma \ref{flat-lemma-zariski}.
\end{proof}







\section{Blowing up and flatness}
\label{section-blowup-flat}

\noindent
Instead of redoing the work in
More on Flatness, Section \ref{flat-section-blowup-flat}
we prove an analogue of More on Flatness, Lemma \ref{flat-lemma-push-ideal}
which tells us that the problem of finding a suitable blowup
is often \'etale local on the base.

\begin{lemma}
\label{lemma-push-ideal}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $\varphi : W \to X$ be a quasi-compact
separated \'etale morphism. Let $U \subset X$ be a quasi-compact open
subspace. Let $\mathcal{I} \subset \mathcal{O}_W$ be a finite type
quasi-coherent sheaf of ideals such that
$V(\mathcal{I}) \cap \varphi^{-1}(U) = \emptyset$.
Then there exists a finite type quasi-coherent sheaf of ideals
$\mathcal{J} \subset \mathcal{O}_X$ such that
\begin{enumerate}
\item $V(\mathcal{J}) \cap U = \emptyset$, and
\item $\varphi^{-1}(\mathcal{J})\mathcal{O}_W = \mathcal{I} \mathcal{I}'$
for some finite type quasi-coherent ideal
$\mathcal{I}' \subset \mathcal{O}_W$.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a factorization $W \to Y \to X$ where $j : W \to Y$ is a
quasi-compact open immersion and $\pi : Y \to X$ is a finite
morphism of finite presentation
(Lemma \ref{lemma-quasi-finite-separated-pass-through-finite-addendum}).
Let $V = j(W) \cup \pi^{-1}(U) \subset Y$. Note that
$\mathcal{I}$ on $W \cong j(W)$ and $\mathcal{O}_{\pi^{-1}(U)}$
glue to a finite type quasi-coherent sheaf of ideals
$\mathcal{I}_1 \subset \mathcal{O}_V$. By
Limits of Spaces, Lemma \ref{spaces-limits-lemma-extend}
there exists a finite type quasi-coherent sheaf of ideals
$\mathcal{I}_2 \subset \mathcal{O}_Y$ such that
$\mathcal{I}_2|_V = \mathcal{I}_1$. In other words,
$\mathcal{I}_2 \subset \mathcal{O}_Y$
is a finite type quasi-coherent sheaf of ideals such that
$V(\mathcal{I}_2)$ is disjoint from $\pi^{-1}(U)$ and
$j^{-1}\mathcal{I}_2 = \mathcal{I}$. Denote $i : Z \to Y$
the corresponding closed immersion which is of finite presentation
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-closed-immersion-finite-presentation}).
In particular the composition $\tau = \pi \circ i : Z \to X$ is finite
and of finite presentation
(Morphisms of Spaces, Lemmas
\ref{spaces-morphisms-lemma-composition-finite-presentation} and
\ref{spaces-morphisms-lemma-composition-integral}).

\medskip\noindent
Let $\mathcal{F} = \tau_*\mathcal{O}_Z$ which we think of as
a quasi-coherent $\mathcal{O}_X$-module. By
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-finite-finitely-presented-module}
we see that $\mathcal{F}$ is a finitely presented $\mathcal{O}_X$-module.
Let $\mathcal{J} = \text{Fit}_0(\mathcal{F})$. (Insert reference to
fitting modules on ringed topoi here.) This is a finite type quasi-coherent
sheaf of ideals on $X$ (as $\mathcal{F}$ is of finite presentation, see
More on Algebra, Lemma \ref{more-algebra-lemma-fitting-ideal-basics}).
Part (1) of the lemma holds because $|\tau|(|Z|) \cap |U| = \emptyset$
by our choice of $\mathcal{I}_2$ and because the $0$th Fitting ideal
of the trivial module equals the structure sheaf. To prove (2) note that
$\varphi^{-1}(\mathcal{J})\mathcal{O}_W = \text{Fit}_0(\varphi^*\mathcal{F})$
because taking Fitting ideals commutes with base change.
On the other hand, as $\varphi : W \to X$ is separated and \'etale
we see that $(1, j) : W \to W \times_X Y$ is an open and closed immersion.
Hence $W \times_Y Z = V(\mathcal{I}) \amalg Z'$ for some finite and
finitely presented morphism of algebraic spaces $\tau' : Z' \to W$.
Thus we see that
\begin{align*}
\text{Fit}_0(\varphi^*\mathcal{F}) & =
\text{Fit}_0((W \times_Y Z \to W)_*\mathcal{O}_{W \times_Y Z}) \\
& =
\text{Fit}_0(\mathcal{O}_W/\mathcal{I}) \cdot
\text{Fit}_0(\tau'_*\mathcal{O}_{Z'}) \\
& =
\mathcal{I} \cdot \text{Fit}_0(\tau'_*\mathcal{O}_{Z'})
\end{align*}
the second equality by
More on Algebra, Lemma \ref{more-algebra-lemma-fitting-ideal-basics}
translated in sheaves on ringed topoi.
Setting $\mathcal{I}' = \text{Fit}_0(\tau'_*\mathcal{O}_{Z'})$
finishes the proof of the lemma.
\end{proof}

\begin{theorem}
\label{theorem-flatten-module}
Let $S$ be a scheme. Let $B$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $X$ be an algebraic space over $B$.
Let $\mathcal{F}$ be a quasi-coherent module on $X$.
Let $U \subset B$ be a quasi-compact open subspace. Assume
\begin{enumerate}
\item $X$ is quasi-compact,
\item $X$ is locally of finite presentation over $B$,
\item $\mathcal{F}$ is a module of finite type,
\item $\mathcal{F}_U$ is of finite presentation, and
\item $\mathcal{F}_U$ is flat over $U$.
\end{enumerate}
Then there exists a $U$-admissible blowup $B' \to B$ such that the
strict transform $\mathcal{F}'$ of $\mathcal{F}$ is an
$\mathcal{O}_{X \times_B B'}$-module of finite presentation and
flat over $B'$.
\end{theorem}

\begin{proof}
Choose an affine scheme $V$ and a surjective \'etale morphism $V \to X$.
Because strict transform commutes with \'etale localization
(Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-strict-transform-local})
it suffices to prove the result with $X$ replaced by $V$. Hence we
may assume that $X \to B$ is representable (in addition to the
hypotheses of the lemma).

\medskip\noindent
Assume that $X \to B$ is representable. Choose an affine scheme $W$ and a
surjective \'etale morphism $\varphi : W \to B$. Note that $X \times_B W$
is a scheme. By the case of schemes
(More on Flatness, Theorem \ref{flat-theorem-flatten-module})
we can find a finite type quasi-coherent sheaf of ideals
$\mathcal{I} \subset \mathcal{O}_W$ such that
(a) $|V(\mathcal{I})| \cap |\varphi^{-1}(U)| = \emptyset$ and (b)
the strict transform of $\mathcal{F}|_{X \times_B W}$ with respect
to the blowing up $W' \to W$ in $\mathcal{I}$ becomes flat over $W'$
and is a module of finite presentation. Choose a finite type sheaf of ideals
$\mathcal{J} \subset \mathcal{O}_B$ as in Lemma \ref{lemma-push-ideal}.
Let $B' \to B$ be the blowing up of $\mathcal{J}$. We claim that this
blowup works. Namely, it is clear that $B' \to B$ is $U$-admissible
by our choice of ideal $\mathcal{J}$. Moreover, the base change
$B' \times_B W \to W$ is the blowup of $W$ in
$\varphi^{-1}\mathcal{J} = \mathcal{I}\mathcal{I}'$
(compatibility of blowup with flat base change, see
Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-flat-base-change-blowing-up}).
Hence there is a factorization
$$
W \times_B B' \to W' \to W
$$
where the first morphism is a blowup as well, see
Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-blowing-up-two-ideals}).
The restriction of $\mathcal{F}'$ (which lives on $B' \times_B X$)
to $W \times_B B' \times_B X$ is the strict transform of
$\mathcal{F}|_{X \times_B W}$
(Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-strict-transform-local})
and hence is the twice repeated strict transform of
$\mathcal{F}|_{X \times_B W}$ by the two blowups displayed above
(Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-strict-transform-composition-blowups}).
After the first blowup our sheaf is already flat over
the base and of finite presentation (by construction). Whence this holds 
after the second strict transform as well (since this is a
pullback by Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-strict-transform-flat}).
Thus we see that the restriction of $\mathcal{F}'$
to an \'etale cover of $B' \times_B X$ has the desired properties
and the theorem is proved.
\end{proof}







\section{Applications}
\label{section-applications-flattening-by-blowing-up}

\noindent
In this section we apply the result on flattening by blowing up.

\begin{lemma}
\label{lemma-flat-after-blowing-up}
Let $S$ be a scheme. Let $f : X \to B$ be a morphism of algebraic
spaces over $S$. Let $U \subset B$ be an open subspace. Assume
\begin{enumerate}
\item $B$ is quasi-compact and quasi-separated,
\item $U$ is quasi-compact,
\item $f : X \to B$ is of finite type and quasi-separated, and
\item $f^{-1}(U) \to U$ is flat and locally of finite presentation.
\end{enumerate}
Then there exists a $U$-admissible blowup $B' \to B$ such that
the strict transform $X'$ of $X$ is flat and of finite presentation
over $B'$.
\end{lemma}

\begin{proof}
Let $B' \to B$ be a $U$-admissible blowup. Note that the strict transform
of $X$ is quasi-compact and quasi-separated over $B'$ as $X$ is quasi-compact
and quasi-separated over $B$. Hence we only need to worry about finding
a $U$-admissible blowup such that the strict transform becomes flat and
locally of finite presentation. We cannot directly apply
Theorem \ref{theorem-flatten-module} because $X$ is not locally of finite
presentation over $B$.

\medskip\noindent
Choose an affine scheme $V$ and a surjective \'etale morphism $V \to X$.
(This is possible as $X$ is quasi-compact as a finite type space over
the quasi-compact space $B$.) Then it suffices to show the result for
the morphism $V \to B$ (as strict transform commutes with \'etale
localization, see Divisors on Spaces,
Lemma \ref{spaces-divisors-lemma-strict-transform-local}).
Hence we may assume that $X \to B$ is separated as well as finite type.
In this case we can find a closed immersion $i : X \to Y$ with $Y \to B$
separated and of finite presentation, see
Limits of Spaces, Proposition
\ref{spaces-limits-proposition-separated-closed-in-finite-presentation}.

\medskip\noindent
Apply Theorem \ref{theorem-flatten-module} to $\mathcal{F} = i_*\mathcal{O}_X$
on $Y/B$. We find a $U$-admissible blowup $B' \to B$ such that strict
transform of $\mathcal{F}$ is flat over $B'$ and of finite presentation.
Let $X'$ be the strict transform of $X$ under the blowup $B' \to B$.
Let $i' : X' \to Y \times_B B'$ be the induced morphism.
Since taking strict transform commutes with pushforward along affine
morphisms (Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-strict-transform-affine}),
we see that $i'_*\mathcal{O}_{X'}$ is flat over $B'$ and of
finite presentation as a $\mathcal{O}_{Y \times_B B'}$-module.
Thus $X' \to B'$ is flat and locally of finite presentation.
This implies the lemma by our earlier remarks.
\end{proof}

\begin{lemma}
\label{lemma-finite-after-blowing-up}
Let $S$ be a scheme. Let $f : X \to B$ be a morphism of algebraic
spaces over $S$. Let $U \subset B$ be an open subspace. Assume
\begin{enumerate}
\item $B$ is quasi-compact and quasi-separated,
\item $U$ is quasi-compact,
\item $f : X \to B$ is proper, and
\item $f^{-1}(U) \to U$ is finite locally free.
\end{enumerate}
Then there exists a $U$-admissible blowup $B' \to B$ such that
the strict transform $X'$ of $X$ is finite locally free over $B'$.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-flat-after-blowing-up} we may assume that
$X \to B$ is flat and of finite presentation. After replacing
$B$ by a $U$-admissible blowup if necessary, we may assume
that $U \subset B$ is scheme theoretically dense. Then $f$ is
finite by Lemma \ref{lemma-proper-flat-finite-over-dense-open}.
Hence $f$ is finite locally free by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-flat}.
\end{proof}

\begin{lemma}
\label{lemma-isomorphism-after-blowing-up}
Let $S$ be a scheme. Let $f : X \to B$ be a morphism of algebraic
spaces over $S$. Let $U \subset B$ be an open subspace. Assume
\begin{enumerate}
\item $B$ is quasi-compact and quasi-separated,
\item $U$ is quasi-compact,
\item $f : X \to B$ is proper, and
\item $f^{-1}(U) \to U$ is an isomorphism.
\end{enumerate}
Then there exists a $U$-admissible blowup $B' \to B$ such that
the strict transform $X'$ of $X$ maps isomorphically to $B'$.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-flat-after-blowing-up} we may assume that
$X \to B$ is flat and of finite presentation. After replacing
$B$ by a $U$-admissible blowup if necessary, we may assume
that $U \subset B$ is scheme theoretically dense. Then $f$ is
finite by Lemma \ref{lemma-proper-flat-finite-over-dense-open}
and an open immersion by Lemma \ref{lemma-zariski}. Hence $f$
is an open immersion whose image is closed and contains the
dense open $U$, whence $f$ is an isomorphism.
\end{proof}

\begin{lemma}
\label{lemma-zariski-after-blowup}
Let $S$ be a scheme. Let $f : X \to B$ be a morphism of algebraic spaces
over $S$. Let $U \subset B$ be an open subspace. Assume
\begin{enumerate}
\item $B$ quasi-compact and quasi-separated,
\item $U$ is quasi-compact,
\item $f$ is of finite type
\item $f^{-1}(U) \to U$ is an isomorphism.
\end{enumerate}
Then there exists a $U$-admissible blowup $B' \to B$ such that $U$
is scheme theoretically dense in $B'$ and such that the strict
transform $X'$ of $X$ maps isomorphically to an open subspace of $B'$.
\end{lemma}

\begin{proof}
This lemma is a generalization of
Lemma \ref{lemma-isomorphism-after-blowing-up}.
As the composition of $U$-admissible blowups is $U$-admissible
(Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-composition-admissible-blowups})
we can proceed in stages. Pick a finite type quasi-coherent sheaf
of ideals $\mathcal{I} \subset \mathcal{O}_B$ with
$|B| \setminus |U| = |V(\mathcal{I})|$. Replace $B$ by the blowup
of $B$ in $\mathcal{I}$ and $X$ by the strict transform of $X$.
After this replacement $B \setminus U$ is the support of an effective
Cartier divisor $D$ (Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-blowing-up-gives-effective-Cartier-divisor}).
In particular $U$ is scheme theoretically dense in $B$
(Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-complement-effective-Cartier-divisor}).
Next, we do another $U$-admissible blowup to get to the situation where
$X \to B$ is flat and of finite presentation, see
Lemma \ref{lemma-flat-after-blowing-up}. Note that $U$ is still scheme
theoretically dense in $B$. Hence $X \to B$ is an open immersion by
Lemma \ref{lemma-zariski}.
\end{proof}

\noindent
The following lemma says that a modification can be dominated
by a blowup.

\begin{lemma}
\label{lemma-dominate-modification-by-blowup}
Let $S$ be a scheme. Let $f : X \to B$ be a morphism of algebraic spaces
over $S$. Let $U \subset B$ be an open subspace. Assume
\begin{enumerate}
\item $B$ is quasi-compact and quasi-separated,
\item $U$ is quasi-compact,
\item $f : X \to B$ is proper,
\item $f^{-1}(U) \to U$ us an isomorphism.
\end{enumerate}
Then there exists a $U$-admissible blowup $B' \to B$ which dominates $X$,
i.e., such that there exists a factorization $B' \to X \to B$
of the blowup morphism.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-isomorphism-after-blowing-up} we may find a $U$-admissible
blowup $B' \to B$ such that the strict transform $X'$ maps isomorphically to
$B'$. Then we can use $B' = X' \to X$ as the factorization.
\end{proof}

\begin{lemma}
\label{lemma-get-section-after-blowup}
Let $S$ be a scheme. Let $X$, $Y$ be algebraic spaces over $S$.
Let $U \subset W \subset Y$ be open subspaces.
Let $f : X \to W$ and let $s : U \to X$ be morphisms
such that $f \circ s = \text{id}_U$. Assume
\begin{enumerate}
\item $f$ is proper,
\item $Y$ is quasi-compact and quasi-separated, and
\item $U$ and $W$ are quasi-compact.
\end{enumerate}
Then there exists a $U$-admissible blowup $b : Y' \to Y$ and a morphism
$s' : b^{-1}(W) \to X$ extending $s$ with $f \circ s' = b|_{b^{-1}(W)}$.
\end{lemma}

\begin{proof}
We may and do replace $X$ by the scheme theoretic image of $s$.
Then $X \to W$ is an isomorphism over $U$, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-scheme-theoretic-image-of-partial-section}.
By Lemma \ref{lemma-dominate-modification-by-blowup}
there exists a $U$-admissible blowup $W' \to W$ and an
extension $W' \to X$ of $s$.
We finish the proof by applying
Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-extend-admissible-blowups}
to extend $W' \to W$ to a $U$-admissible blowup of $Y$.
\end{proof}















\section{Chow's lemma}
\label{section-chow}

\noindent
In this section we prove Chow's lemma
(Lemma \ref{lemma-chow-noetherian-separated}).
We encourage the reader to take a look at
Cohomology of Spaces, Section \ref{spaces-cohomology-section-weak-chow}
for a weak version of Chow's lemma that is easy to prove and sufficient
for many applications.

\medskip\noindent
Since we have yet to define projective morphisms of algebraic spaces,
the statements of lemmas (see for example
Lemma \ref{lemma-blowup-to-find-embedding}) will
involve representable proper morphisms, rather than projective ones.

\begin{lemma}
\label{lemma-find-common-blowups}
Let $S$ be a scheme. Let $Y$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $U \to X_1$ and $U \to X_2$ be open immersions
of algebraic spaces over $Y$ and assume $U$, $X_1$, $X_2$ of finite
type and separated over $Y$. Then there exists a commutative diagram
$$
\xymatrix{
X_1' \ar[d] \ar[r] & X & X_2' \ar[l] \ar[d] \\
X_1 & U \ar[l] \ar[lu] \ar[u] \ar[ru] \ar[r] & X_2
}
$$
of algebraic spaces over $Y$ where $X_i' \to X_i$ is a $U$-admissible
blowup, $X_i' \to X$ is an open immersion, and $X$ is separated and finite
type over $Y$.
\end{lemma}

\begin{proof}
Throughout the proof all the algebraic spaces will be separated of finite
type over $Y$. This in particular implies these algebraic spaces are
quasi-compact and quasi-separated and that the morphisms between them
will be quasi-compact and separated. See
Morphisms of Spaces, Sections
\ref{spaces-morphisms-section-separation-axioms} and
\ref{spaces-morphisms-section-quasi-compact}.
We will use that if $U \to W$ is an immersion of such spaces over $Y$,
then the scheme theoretic image $Z$ of $U$ in $W$ is a closed subspace
of $W$ and $U \to Z$ is an open immersion, $U \subset Z$ is scheme
theoretically dense, and $|U| \subset |Z|$ is dense. See
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-immersion}.

\medskip\noindent
Let $X_{12} \subset X_1 \times_Y X_2$ be the scheme theoretic image
of $U \to X_1 \times_Y X_2$. The projections $p_i : X_{12} \to X_i$
induce isomorphisms $p_i^{-1}(U) \to U$ by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-scheme-theoretic-image-of-partial-section}.
Choose a $U$-admissible blowup $X_i^i \to X_i$ such that
the strict transform $X_{12}^i$ of $X_{12}$ is isomorphic to an
open subspace of $X_i^i$, see
Lemma \ref{lemma-zariski-after-blowup}.
Let $\mathcal{I}_i \subset \mathcal{O}_{X_i}$ be the corresponding
finite type quasi-coherent sheaf of ideals.
Recall that $X_{12}^i \to X_{12}$ is the blowup in
$p_i^{-1}\mathcal{I}_i \mathcal{O}_{X_{12}}$, see
Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-strict-transform}.
Let $X_{12}'$ be the blowup of $X_{12}$ in
$p_1^{-1}\mathcal{I}_1 p_2^{-1}\mathcal{I}_2 \mathcal{O}_{X_{12}}$, see
Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-blowing-up-two-ideals}
for what this entails. We obtain a commutative diagram
$$
\xymatrix{
X_{12}' \ar[d] \ar[r] & X_{12}^2 \ar[d] \\
X_{12}^1 \ar[r] & X_{12}
}
$$
where all the morphisms are $U$-admissible blowing ups. Since
$X_{12}^i \subset X_i^i$ is an open we may choose a $U$-admissible blowup
$X_i' \to X_i^i$ restricting to $X_{12}' \to X_{12}^i$, see
Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-extend-admissible-blowups}.
Then $X_{12}' \subset X_i'$ is an open subspace and the diagram
$$
\xymatrix{
X_{12}' \ar[d] \ar[r] & X_i' \ar[d] \\
X_{12}^i \ar[r] & X_i^i
}
$$
is commutative with vertical arrows blowing ups and horizontal arrows
open immersions. Note that $X'_{12} \to X_1' \times_Y X_2'$ is
an immersion and proper (use that $X'_{12} \to X_{12}$ is proper
and $X_{12} \to X_1 \times_Y X_2$ is closed and $X_1' \times_Y X_2' \to
X_1 \times_Y X_2$ is separated and apply Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-permanence}).
Thus $X'_{12} \to  X_1' \times_Y X_2'$ is a closed immersion.
If we define $X$ by glueing $X_1'$ and $X_2'$ along the common open
subspace $X_{12}'$, then $X \to Y$ is of finite type and
separated\footnote{Because we may check closedness of the diagonal
$X \to X \times_Y X$ over the four open parts $X'_i \times_Y X'_j$
of $X \times_Y X$ where it is clear.}. As compositions of
$U$-admissible blowups are $U$-admissible blowups
(Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-composition-admissible-blowups})
the lemma is proved.
\end{proof}

\begin{lemma}
\label{lemma-blowup-to-find-embedding}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Let $U \subset X$ be an open subspace. Assume
\begin{enumerate}
\item $U$ is quasi-compact,
\item $Y$ is quasi-compact and quasi-separated,
\item there exists an immersion $U \to \mathbf{P}^n_Y$ over $Y$,
\item $f$ is of finite type and separated.
\end{enumerate}
Then there exists a commutative diagram
$$
\xymatrix{
& U \ar[ld] \ar[d] \ar[rd] \ar[rrd] \\
X \ar[rd] & X' \ar[l] \ar[d] \ar[r] & Z' \ar[ld] \ar[r] & Z \ar[ld] \\
& Y & \mathbf{P}^n_Y \ar[l]
}
$$
where
the arrows with source $U$ are open immersions,
$X' \to X$ is a $U$-admissible blowup,
$X' \to Z'$ is an open immersion,
$Z' \to Y$ is a proper and representable morphism of algebraic spaces.
More precisely, $Z' \to Z$ is a $U$-admissible blowup
and $Z \to \mathbf{P}^n_Y$ is a closed immersion.
\end{lemma}

\begin{proof}
Let $Z \subset \mathbf{P}^n_Y$ be the scheme theoretic image of
the immersion $U \to \mathbf{P}^n_Y$. Since $U \to \mathbf{P}^n_Y$
is quasi-compact we see that $U \subset Z$ is a
(scheme theoretically) dense open subspace
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-immersion}).
Apply Lemma \ref{lemma-find-common-blowups} to find a diagram
$$
\xymatrix{
X' \ar[d] \ar[r] & \overline{X}' & Z' \ar[l] \ar[d] \\
X & U \ar[l] \ar[lu] \ar[u] \ar[ru] \ar[r] & Z
}
$$
with properties as listed in the statement of that lemma.
As $X' \to X$ and $Z' \to Z$ are $U$-admissible blowups
we find that $U$ is a scheme theoretically dense open of
both $X'$ and $Z'$ (see Divisors on Spaces, Lemmas
\ref{spaces-divisors-lemma-blowing-up-gives-effective-Cartier-divisor} and
\ref{spaces-divisors-lemma-complement-effective-Cartier-divisor}).
Since $Z' \to Z \to Y$ is proper we see that $Z' \subset \overline{X}'$
is a closed subspace (see Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-permanence}).
It follows that $X' \subset Z'$ (scheme theoretically), hence $X'$
is an open subspace of $Z'$ (small detail omitted) and the lemma is proved.
\end{proof}

\begin{lemma}
\label{lemma-chow-noetherian}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume $f$ separated, of finite type, and $Y$ Noetherian.
Then there exists a dense open subspace $U \subset X$ and
a commutative diagram
$$
\xymatrix{
& U \ar[ld] \ar[d] \ar[rd] \ar[rrd] \\
X \ar[rd] & X' \ar[l] \ar[d] \ar[r] & Z' \ar[ld] \ar[r] & Z \ar[ld] \\
& Y & \mathbf{P}^n_Y \ar[l]
}
$$
where
the arrows with source $U$ are open immersions,
$X' \to X$ is a $U$-admissible blowup,
$X' \to Z'$ is an open immersion,
$Z' \to Y$ is a proper and representable morphism of algebraic spaces.
More precisely, $Z' \to Z$ is a $U$-admissible blowup
and $Z \to \mathbf{P}^n_Y$ is a closed immersion.
\end{lemma}

\begin{proof}
By Limits of Spaces, Lemma
\ref{spaces-limits-lemma-embedding-into-affine-over-qs}
there exists a dense open subspace $U \subset X$ and an immersion
$U \to \mathbf{A}^n_Y$ over $Y$. Composing with the open immersion
$\mathbf{A}^n_Y \to \mathbf{P}^n_Y$ we obtain a situation as in
Lemma \ref{lemma-blowup-to-find-embedding} and the result
follows.
\end{proof}

\begin{remark}
\label{remark-chow-Noetherian}
In Lemmas \ref{lemma-blowup-to-find-embedding} and \ref{lemma-chow-noetherian}
the morphism $g : Z' \to Y$ is a composition of projective morphisms.
Presumably (by the analogue for algebraic spaces of
Morphisms, Lemma \ref{morphisms-lemma-ample-composition})
there exists a $g$-ample invertible sheaf on $Z'$.
If we ever need this, then we will state and prove this here.
\end{remark}

\noindent
The following result is \cite[IV Theorem 3.1]{Kn}. Note that the immersion
$X' \to \mathbf{P}^n_Y$ is quasi-compact, hence can be factored as
$X' \to Z' \to \mathbf{P}^n_Y$ where the first morphism is an
open immersion and the second morphism a closed immersion
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-immersion}).

\begin{lemma}[Chow's lemma]
\label{lemma-chow-noetherian-separated}
\begin{reference}
\cite[IV Theorem 3.1]{Kn}
\end{reference}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume $f$ separated of finite type, and $Y$ separated and
Noetherian. Then there exists a commutative diagram
$$
\xymatrix{
X \ar[rd] & X' \ar[l] \ar[d] \ar[r] & \mathbf{P}^n_Y \ar[ld] \\
& Y
}
$$
where $X' \to X$ is a $U$-admissible blowup for some dense open
$U \subset X$ and the morphism $X' \to \mathbf{P}^n_Y$ is an immersion.
\end{lemma}

\begin{proof}
In this first paragraph of the proof we reduce the lemma to the case
where $Y$ is of finite type over $\Spec(\mathbf{Z})$.
We may and do replace the base scheme $S$ by $\Spec(\mathbf{Z})$.
We can write $Y = \lim Y_i$ as a directed limit of separated
algebraic spaces of finite type over $\Spec(\mathbf{Z})$, see
Limits of Spaces, Proposition \ref{spaces-limits-proposition-approximate} and
Lemma \ref{spaces-limits-lemma-descend-separated}.
For all $i$ sufficiently large we can find a separated finite type morphism
$X_i \to Y_i$ such that $X = Y \times_{Y_i} X_i$, see
Limits of Spaces, Lemmas
\ref{spaces-limits-lemma-descend-finite-presentation} and
\ref{spaces-limits-lemma-descend-separated-morphism}.
Let $\eta_1, \ldots, \eta_n$ be the generic points of the irreducible
components of $|X|$ ($X$ is Noetherian as a finite type separated
algebraic space over the Noetherian algebraic space $Y$ and therefore
$|X|$ is a Noetherian topological space).
By Limits of Spaces, Lemma \ref{spaces-limits-lemma-topology-limit}
we find that the images of $\eta_1, \ldots, \eta_n$ in $|X_i|$
are distinct for $i$ large enough. We may replace
$X_i$ by the scheme theoretic image of the (quasi-compact, in fact affine)
morphism $X \to X_i$.
After this replacement we see that the images
of $\eta_1, \ldots, \eta_n$ in $|X_i|$ are the generic points of the
irreducible components of $|X_i|$, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-quasi-compact-scheme-theoretic-image}.
Having said this, suppose we can find a diagram
$$
\xymatrix{
X_i \ar[rd] & X_i' \ar[l] \ar[d] \ar[r] & \mathbf{P}^n_{Y_i} \ar[ld] \\
& Y
}
$$
where $X_i' \to X_i$ is a $U_i$-admissible blowup for some dense open
$U_i \subset X_i$ and the morphism $X_i' \to \mathbf{P}^n_{Y_i}$
is an immersion. Then the strict transform $X' \to X$ of $X$ relative
to $X_i' \to X_i$ is a $U$-admissible blowing up where $U \subset X$
is the inverse image of $U_i$ in $X$. Because of our carefully chosen
index $i$ it follows that $\eta_1, \ldots, \eta_n \in |U|$ and
$U \subset X$ is dense. Moreover, $X' \to \mathbf{P}^n_Y$ is an
immersion as $X'$ is closed in
$X_i' \times_{X_i} X = X_i' \times_{Y_i} Y$
which comes with an immersion into $\mathbf{P}^n_Y$. Thus we have reduced
to the situation of the following paragraph.

\medskip\noindent
Assume that $Y$ is separated of finite type over $\Spec(\mathbf{Z})$.
Then $X \to \Spec(\mathbf{Z})$ is separated of finite type as well.
We apply Lemma \ref{lemma-chow-noetherian} to $X \to \Spec(\mathbf{Z})$
to find a dense open subspace $U \subset X$ and a commutative diagram
$$
\xymatrix{
& U \ar[ld] \ar[d] \ar[rd] \ar[rrd] \\
X \ar[rd] & X' \ar[l] \ar[d] \ar[r] & Z' \ar[ld] \ar[r] & Z \ar[ld] \\
& \Spec(\mathbf{Z}) & \mathbf{P}^n_\mathbf{Z} \ar[l]
}
$$
with all the properties listed in the lemma.
Note that $Z$ has an ample invertible sheaf, namely
$\mathcal{O}_{\mathbf{P}^n}(1)|_Z$. Hence $Z' \to Z$
is a H-projective morphism by Morphisms, Lemma
\ref{morphisms-lemma-projective-over-quasi-projective-is-H-projective}.
It follows that $Z' \to \Spec(\mathbf{Z})$ is H-projective
by Morphisms, Lemma \ref{morphisms-lemma-H-projective-composition}.
Thus there exists a closed immersion
$Z' \to \mathbf{P}^m_{\Spec(\mathbf{Z})}$ for some $m \geq 0$.
It follows that the diagonal morphism
$$
X' \to Y \times \mathbf{P}^m_\mathbf{Z} = \mathbf{P}^m_Y
$$
is an immersion (because the composition with the projection
to $\mathbf{P}^m_\mathbf{Z}$ is an immersion) and we win.
\end{proof}






\section{Variants of Chow's Lemma}
\label{section-chows-lemma}

\noindent
In this section we prove a number of variants of Chow's lemma dealing
with morphisms between non-Noetherian algebraic spaces.
The Noetherian versions are
Lemma \ref{lemma-chow-noetherian}
and
Lemma \ref{lemma-chow-noetherian-separated}.

\begin{lemma}
\label{lemma-chow-finite-type}
Let $S$ be a  scheme. Let $Y$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $f : X \to Y$ be a separated morphism of
finite type. Then there exists a commutative diagram
$$
\xymatrix{
X \ar[rd] & X' \ar[l] \ar[d] \ar[r] & \overline{X}' \ar[ld] \\
& Y
}
$$
where $X' \to X$ is proper surjective,
$X' \to \overline{X}'$ is an open immersion, and
$\overline{X}' \to Y$ is proper and representable morphism
of algebraic spaces.
\end{lemma}

\begin{proof}
By
Limits of Spaces, Proposition
\ref{spaces-limits-proposition-separated-closed-in-finite-presentation}
we can find a closed immersion $X \to X_1$ where $X_1$ is separated
and of finite presentation over $Y$. Clearly, if we prove the assertion
for $X_1 \to Y$, then the result follows for $X$. Hence we may assume that
$X$ is of finite presentation over $Y$.

\medskip\noindent
We may and do replace the base scheme $S$ by $\Spec(\mathbf{Z})$.
Write $Y = \lim_i Y_i$ as a directed limit of
quasi-separated algebraic spaces of finite type over $\Spec(\mathbf{Z})$, see
Limits of Spaces,
Proposition \ref{spaces-limits-proposition-approximate}.
By
Limits of Spaces,
Lemma \ref{spaces-limits-lemma-descend-finite-presentation}
we can
find an index $i \in I$ and a scheme $X_i \to Y_i$ of finite presentation
so that $X = Y \times_{Y_i} X_i$.
By
Limits of Spaces,
Lemma \ref{spaces-limits-lemma-descend-separated-morphism}
we may assume that $X_i \to Y_i$ is separated.
Clearly, if we prove the assertion for
$X_i$ over $Y_i$, then the assertion holds for $X$. The case
$X_i \to Y_i$ is treated by
Lemma \ref{lemma-chow-noetherian}.
\end{proof}

\begin{lemma}
\label{lemma-chow-finite-type-separated}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. Assume $f$ separated of finite type, and $Y$ separated and
quasi-compact. Then there exists a commutative diagram
$$
\xymatrix{
X \ar[rd] & X' \ar[l] \ar[d] \ar[r] & \mathbf{P}^n_Y \ar[ld] \\
& Y
}
$$
where $X' \to X$ is proper surjective morphism
and the morphism $X' \to \mathbf{P}^n_Y$ is an immersion.
\end{lemma}

\begin{proof}
By
Limits of Spaces, Proposition
\ref{spaces-limits-proposition-separated-closed-in-finite-presentation}
we can find a closed immersion $X \to X_1$ where $X_1$ is separated
and of finite presentation over $Y$. Clearly, if we prove the assertion
for $X_1 \to Y$, then the result follows for $X$. Hence we may assume that
$X$ is of finite presentation over $Y$.

\medskip\noindent
We may and do replace the base scheme $S$ by $\Spec(\mathbf{Z})$.
Write $Y = \lim_i Y_i$ as a directed limit of
quasi-separated algebraic spaces of finite type over $\Spec(\mathbf{Z})$, see
Limits of Spaces,
Proposition \ref{spaces-limits-proposition-approximate}.
By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-separated}
we may assume that $Y_i$ is separated for all $i$.
By
Limits of Spaces,
Lemma \ref{spaces-limits-lemma-descend-finite-presentation}
we can
find an index $i \in I$ and a scheme $X_i \to Y_i$ of finite presentation
so that $X = Y \times_{Y_i} X_i$.
By
Limits of Spaces,
Lemma \ref{spaces-limits-lemma-descend-separated-morphism}
we may assume that $X_i \to Y_i$ is separated.
Clearly, if we prove the assertion for
$X_i$ over $Y_i$, then the assertion holds for $X$. The case
$X_i \to Y_i$ is treated by
Lemma \ref{lemma-chow-noetherian-separated}.
\end{proof}






\section{Grothendieck's existence theorem}
\label{section-existence-proper}

\noindent
In this section we discuss Grothendieck's existence theorem for algebraic
spaces. Instead of developing a theory of ``formal algebraic spaces''
we temporarily develop a bit of language that replaces the notion of a
``coherent module on a Noetherian adic formal space''.

\medskip\noindent
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$.
Let $\mathcal{I} \subset \mathcal{O}_X$ be a quasi-coherent sheaf of ideals.
Below we will consider inverse systems $(\mathcal{F}_n)$ of coherent
$\mathcal{O}_X$-modules such that
\begin{enumerate}
\item $\mathcal{F}_n$ is annihilated by $\mathcal{I}^n$, and
\item the transition maps induce isomorphisms
$\mathcal{F}_{n + 1}/\mathcal{I}^n\mathcal{F}_{n + 1} \to \mathcal{F}_n$.
\end{enumerate}
A morphism $\alpha : (\mathcal{F}_n) \to (\mathcal{G}_n)$
of such inverse systems is simply a compatible system of morphisms
$\alpha_n : \mathcal{F}_n \to \mathcal{G}_n$.
Let us denote the category of these inverse systems with
$\textit{Coh}(X, \mathcal{I})$. We will develop some theory regarding
these systems that will parallel to the corresponding
results in the case of schemes, see
Cohomology of Schemes, Sections \ref{coherent-section-existence},
\ref{coherent-section-existence-proper},
\ref{coherent-section-existence-proper-support}, and
\ref{coherent-section-algebraization}.

\medskip\noindent
Functoriality. Let $f : X \to Y$ be a
morphism of Noetherian algebraic spaces over a scheme $S$, and
let $\mathcal{J} \subset \mathcal{O}_Y$ be a quasi-coherent sheaf
of ideals. Set $\mathcal{I} = f^{-1}\mathcal{J}\mathcal{O}_X$.
In this situation there is a functor
$$
f^* : \textit{Coh}(Y, \mathcal{J}) \longrightarrow \textit{Coh}(X, \mathcal{I})
$$
which sends $(\mathcal{G}_n)$ to $(f^*\mathcal{G}_n)$. Compare with
Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-pullback}.
If $f$ is \'etale, then we may think of this as simply the restriction
of the system to $X$, see Properties of Spaces, 
Equation \ref{spaces-properties-equation-restrict-modules}.

\medskip\noindent
\'Etale descent. Let $S$ be a scheme. Let $U_0 \to X$ be a surjective
\'etale morphism of Noetherian algebraic spaces. Set
$U_1 = U_0 \times_X U_0$ and $U_2 = U_0 \times_X U_0 \times_X U_0$.
Let $\mathcal{I} \subset \mathcal{O}_{X}$ be a quasi-coherent sheaf
of ideals. Set $\mathcal{I}_i = \mathcal{I}|_{U_i}$. In this situation
we obtain a diagram of categories
$$
\xymatrix{
\textit{Coh}(X, \mathcal{I}) \ar[r] &
\textit{Coh}(U_0, \mathcal{I}_0) \ar@<0.5ex>[r] \ar@<-0.5ex>[r] &
\textit{Coh}(U_1, \mathcal{I}_1) \ar@<1ex>[r] \ar[r] \ar@<-1ex>[r] &
\textit{Coh}(U_2, \mathcal{I}_2)
}
$$
an the first arrow presents $\textit{Coh}(X, \mathcal{I})$ as the
homotopy limit of the right part of the diagram. More precisely, given
a {\it descent datum}, i.e., a pair $((\mathcal{G}_n), \varphi)$ where
$(\mathcal{G}_n)$ is an object of $\textit{Coh}(U_0, \mathcal{I}_0)$ and
$\varphi : \text{pr}_0^*(\mathcal{G}_n) \to \text{pr}_1^*(\mathcal{G}_n)$
is an isomorphism in $\textit{Coh}(U_1, \mathcal{I}_1)$
satisfying the cocycle condition in $\textit{Coh}(U_2, \mathcal{I}_2)$,
then there exists a unique object $(\mathcal{F}_n)$ of
$\textit{Coh}(X, \mathcal{I})$ whose associated canonical descent datum
is isomorphic to $((\mathcal{G}_n), \varphi)$. Compare with
Descent on Spaces, Definition
\ref{spaces-descent-definition-descent-datum-effective-quasi-coherent}.
The proof of this statement follows immediately by applying
Descent on Spaces, Proposition
\ref{spaces-descent-proposition-fpqc-descent-quasi-coherent}
to the descent data $(\mathcal{G}_n, \varphi_n)$ for varying $n$.

\begin{lemma}
\label{lemma-inverse-systems-abelian}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$ and
let $\mathcal{I} \subset \mathcal{O}_X$ be a quasi-coherent sheaf of ideals.
\begin{enumerate}
\item The category $\textit{Coh}(X, \mathcal{I})$ is abelian.
\item Exactness in $\textit{Coh}(X, \mathcal{I})$
can be checked \'etale locally.
\item For any flat morphism $f : X' \to X$ of Noetherian algebraic spaces
the functor $f^* : \textit{Coh}(X, \mathcal{I}) \to
\textit{Coh}(X', f^{-1}\mathcal{I}\mathcal{O}_{X'})$ is exact.
\end{enumerate}
\end{lemma}

\begin{proof}
Proof of (1). Choose an affine scheme $U_0$ and a surjective \'etale morphism
$U_0 \to X$. Set $U_1 = U_0 \times_X U_0$ and
$U_2 = U_0 \times_X U_0 \times_X U_0$ as in our discussion of
\'etale descent above. The categories $\textit{Coh}(U_i, \mathcal{I}_i)$
are abelian
(Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-abelian})
and the pullback functors are exact functors
$\textit{Coh}(U_0, \mathcal{I}_0) \to \textit{Coh}(U_1, \mathcal{I}_1)$
and
$\textit{Coh}(U_1, \mathcal{I}_1) \to \textit{Coh}(U_2, \mathcal{I}_2)$
(Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-pullback}).
The lemma then follows formally from the description of
$\textit{Coh}(X, \mathcal{I})$ as a category of descent data.
Some details omitted; compare with the proof of
Groupoids, Lemma \ref{groupoids-lemma-abelian}.

\medskip\noindent
Part (2) follows immediately from the discussion in the previous paragraph.
In the situation of (3) choose a commutative diagram
$$
\xymatrix{
U' \ar[d] \ar[r] & U \ar[d] \\
X' \ar[r] & X
}
$$
where $U'$ and $U$ are affine schemes and the vertical morphisms are
surjective \'etale. Then $U' \to U$ is a flat morphism of Noetherian
schemes (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-local})
whence the pullback functor
$\textit{Coh}(U, \mathcal{I}\mathcal{O}_U) \to
\textit{Coh}(U', \mathcal{I}\mathcal{O}_{U'})$
is exact by
Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-pullback}.
Since we can check exactness in $\textit{Coh}(X, \mathcal{O}_X)$
on $U$ and similarly for $X', U'$ the assertion follows.
\end{proof}

\begin{lemma}
\label{lemma-inverse-systems-surjective}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$
and let $\mathcal{I} \subset \mathcal{O}_X$ be a quasi-coherent sheaf
of ideals. A map $(\mathcal{F}_n) \to (\mathcal{G}_n)$ is surjective in
$\textit{Coh}(X, \mathcal{I})$ if and only if
$\mathcal{F}_1 \to \mathcal{G}_1$ is surjective.
\end{lemma}

\begin{proof}
We can check on an affine \'etale cover of $X$ by
Lemma \ref{lemma-inverse-systems-abelian}.
Thus we reduce to the case of schemes which is
Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-surjective}.
\end{proof}

\noindent
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$ and
let $\mathcal{I} \subset \mathcal{O}_X$ be a quasi-coherent sheaf of ideals.
There is a functor
\begin{equation}
\label{equation-completion-functor}
\textit{Coh}(\mathcal{O}_X) \longrightarrow \textit{Coh}(X, \mathcal{I}), \quad
\mathcal{F} \longmapsto \mathcal{F}^\wedge
\end{equation}
which associates to the coherent $\mathcal{O}_X$-module $\mathcal{F}$
the object $\mathcal{F}^\wedge = (\mathcal{F}/\mathcal{I}^n\mathcal{F})$
of $\textit{Coh}(X, \mathcal{I})$.

\begin{lemma}
\label{lemma-exact}
The functor (\ref{equation-completion-functor}) is exact.
\end{lemma}

\begin{proof}
It suffices to check this \'etale locally on $X$, see
Lemma \ref{lemma-inverse-systems-abelian}.
Thus we reduce to the case of schemes which is
Cohomology of Schemes, Lemma \ref{coherent-lemma-exact}.
\end{proof}

\begin{lemma}
\label{lemma-completion-internal-hom}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$ and
let $\mathcal{I} \subset \mathcal{O}_X$ be a quasi-coherent sheaf of ideals.
Let $\mathcal{F}$, $\mathcal{G}$ be coherent $\mathcal{O}_X$-modules. Set
$\mathcal{H} = \SheafHom_{\mathcal{O}_X}(\mathcal{F}, \mathcal{G})$.
Then
$$
\lim H^0(X, \mathcal{H}/\mathcal{I}^n\mathcal{H}) =
\Mor_{\textit{Coh}(X, \mathcal{I})}
(\mathcal{F}^\wedge, \mathcal{G}^\wedge).
$$
\end{lemma}

\begin{proof}
Since $\mathcal{H}$ is a sheaf on $X_\etale$ and since
we have \'etale descent for objects of $\textit{Coh}(X, \mathcal{I})$
it suffices to prove this \'etale locally.
Thus we reduce to the case of schemes which is
Cohomology of Schemes, Lemma \ref{coherent-lemma-completion-internal-hom}.
\end{proof}

\noindent
We introduce the setting that we will focus on throughout the
rest of this section.

\begin{situation}
\label{situation-existence}
Here $A$ is a Noetherian ring complete with respect to an ideal $I$.
Also $f : X \to \Spec(A)$ is a finite type separated morphism of
algebraic spaces and $\mathcal{I} = I\mathcal{O}_X$.
\end{situation}

\noindent
In this situation we denote
$$
\textit{Coh}_{\text{support proper over } A}(\mathcal{O}_X)
$$
be the full subcategory of $\textit{Coh}(\mathcal{O}_X)$
consisting of those coherent $\mathcal{O}_X$-modules whose
support is proper over $\Spec(A)$, or equivalently whose
scheme theoretic support is proper over $\Spec(A)$, see
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-module-support-proper-over-base}.
Similarly, we let
$$
\textit{Coh}_{\text{support proper over } A}(X, \mathcal{I})
$$
be the full subcategory of $\textit{Coh}(X, \mathcal{I})$
consisting of those objects $(\mathcal{F}_n)$ such that
the support of $\mathcal{F}_1$ is proper over $\Spec(A)$.
Since the support of a quotient module is contained in the support
of the module, it follows that (\ref{equation-completion-functor})
induces a functor
\begin{equation}
\label{equation-completion-functor-proper-over-A}
\textit{Coh}_{\text{support proper over }A}(\mathcal{O}_X)
\longrightarrow
\textit{Coh}_{\text{support proper over }A}(X, \mathcal{I})
\end{equation}
Our first result is that this functor is fully faithful.

\begin{lemma}
\label{lemma-fully-faithful}
In Situation \ref{situation-existence}.
Let $\mathcal{F}$, $\mathcal{G}$ be coherent $\mathcal{O}_X$-modules.
Assume that the intersection of the supports of
$\mathcal{F}$ and $\mathcal{G}$ is proper over $\Spec(A)$. Then the map
$$
\Mor_{\textit{Coh}(\mathcal{O}_X)}(\mathcal{F}, \mathcal{G})
\longrightarrow
\Mor_{\textit{Coh}(X, \mathcal{I})}
(\mathcal{F}^\wedge, \mathcal{G}^\wedge)
$$
coming from (\ref{equation-completion-functor}) is a bijection.
In particular, (\ref{equation-completion-functor-proper-over-A})
is fully faithful.
\end{lemma}

\begin{proof}
Let $\mathcal{H} = \SheafHom_{\mathcal{O}_X}(\mathcal{G}, \mathcal{F})$.
This is a coherent $\mathcal{O}_X$-module because its restriction
of schemes \'etale over $X$ is coherent by
Modules, Lemma \ref{modules-lemma-internal-hom-locally-kernel-direct-sum}.
By Lemma \ref{lemma-completion-internal-hom} the map
$$
\lim_n H^0(X, \mathcal{H}/\mathcal{I}^n\mathcal{H})
\to
\Mor_{\textit{Coh}(X, \mathcal{I})}
(\mathcal{G}^\wedge, \mathcal{F}^\wedge)
$$
is bijective. Let $i : Z \to X$ be the scheme theoretic support of
$\mathcal{H}$. It is clear that $Z$ is a closed subspace such
that $|Z|$ is contained in the intersection of the supports of $\mathcal{F}$
and $\mathcal{G}$. Hence $Z \to \Spec(A)$ is proper by assumption
(see Derived Categories of Spaces, Section
\ref{spaces-perfect-section-proper-over-base}).
Write $\mathcal{H} = i_*\mathcal{H}'$ for some coherent
$\mathcal{O}_Z$-module $\mathcal{H}'$. We have
$i_*(\mathcal{H}'/I^n\mathcal{H}') = \mathcal{H}/I^n\mathcal{H}$.
Hence we obtain
\begin{align*}
\lim_n H^0(X, \mathcal{H}/\mathcal{I}^n\mathcal{H})
& =
\lim_n H^0(Z, \mathcal{H}'/\mathcal{I}^n\mathcal{H}') \\
& =
H^0(Z, \mathcal{H}') \\
& =
H^0(X, \mathcal{H}) \\
& = 
\Mor_{\textit{Coh}(\mathcal{O}_X)}(\mathcal{F}, \mathcal{G})
\end{align*}
the second equality by the theorem on formal functions
(Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-spell-out-theorem-formal-functions}).
This proves the lemma.
\end{proof}

\begin{remark}
\label{remark-inverse-systems-kernel-cokernel-annihilated-by}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$ and let
$\mathcal{I}, \mathcal{K} \subset \mathcal{O}_X$ be quasi-coherent sheaves of
ideals. Let $\alpha : (\mathcal{F}_n) \to (\mathcal{G}_n)$ be a morphism of
$\textit{Coh}(X, \mathcal{I})$.
Given an affine scheme $U = \Spec(A)$ and a surjective \'etale morphism
$U \to X$ denote $I, K \subset A$ the ideals corresponding to the restrictions
$\mathcal{I}|_U, \mathcal{K}|_U$. Denote $\alpha_U : M \to N$ of finite
$A^\wedge$-modules which corresponds to $\alpha|_U$ via
Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-affine}.
We claim the following are equivalent
\begin{enumerate}
\item there exists an integer $t \geq 1$ such that
$\Ker(\alpha_n)$ and $\Coker(\alpha_n)$
are annihilated by $\mathcal{K}^t$ for all $n \geq 1$,
\item for any (or some) affine open $\Spec(A) = U \subset X$ as above
the modules $\Ker(\alpha_U)$ and $\Coker(\alpha_U)$
are annihilated by $K^t$ for some integer $t \geq 1$.
\end{enumerate}
If these equivalent conditions hold we will say that $\alpha$ is a
{\it map whose kernel and cokernel are annihilated by a power of
$\mathcal{K}$}. To see the equivalence we refer to
Cohomology of Schemes, Remark
\ref{coherent-remark-inverse-systems-kernel-cokernel-annihilated-by}.
\end{remark}

\begin{lemma}
\label{lemma-existence-easy}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$ and let
$\mathcal{I} \subset \mathcal{O}_X$ be a quasi-coherent sheaf of ideals.
Let $\mathcal{G}$ be a coherent $\mathcal{O}_X$-module, $(\mathcal{F}_n)$
an object of $\textit{Coh}(X, \mathcal{I})$, and
$\alpha : (\mathcal{F}_n) \to \mathcal{G}^\wedge$
a map whose kernel and cokernel are annihilated by a power of $\mathcal{I}$.
Then there exists a unique (up to unique isomorphism) triple
$(\mathcal{F}, a, \beta)$ where
\begin{enumerate}
\item $\mathcal{F}$ is a coherent $\mathcal{O}_X$-module,
\item $a : \mathcal{F} \to \mathcal{G}$ is an $\mathcal{O}_X$-module map
whose kernel and cokernel are annihilated by a power of $\mathcal{I}$,
\item $\beta : (\mathcal{F}_n) \to \mathcal{F}^\wedge$ is an isomorphism, and
\item $\alpha = a^\wedge \circ \beta$.
\end{enumerate}
\end{lemma}

\begin{proof}
The uniqueness and \'etale descent for objects of
$\textit{Coh}(X, \mathcal{I})$ and $\textit{Coh}(\mathcal{O}_X)$
implies it suffices to construct $(\mathcal{F}, a, \beta)$ \'etale
locally on $X$. Thus we reduce to the case of schemes which is
Cohomology of Schemes, Lemma \ref{coherent-lemma-existence-easy}.
\end{proof}

\begin{lemma}
\label{lemma-existence-tricky}
In Situation \ref{situation-existence}. Let $\mathcal{K} \subset \mathcal{O}_X$
be a quasi-coherent sheaf of ideals. Let $X_e \subset X$ be the closed subspace
cut out by $\mathcal{K}^e$. Let $\mathcal{I}_e = \mathcal{I}\mathcal{O}_{X_e}$.
Let $(\mathcal{F}_n)$ be an object of
$\textit{Coh}_{\text{support proper over } A}(X, \mathcal{I})$.
Assume
\begin{enumerate}
\item the functor
$\textit{Coh}_{\text{support proper over } A}(\mathcal{O}_{X_e})
\to \textit{Coh}_{\text{support proper over } A}(X_e, \mathcal{I}_e)$
is an equivalence for all $e \geq 1$, and
\item there exists an object $\mathcal{H}$ of
$\textit{Coh}_{\text{support proper over } A}(\mathcal{O}_X)$ and a map
$\alpha : (\mathcal{F}_n) \to \mathcal{H}^\wedge$ whose
kernel and cokernel are annihilated by a power of $\mathcal{K}$.
\end{enumerate}
Then $(\mathcal{F}_n)$ is in the essential image of
(\ref{equation-completion-functor-proper-over-A}).
\end{lemma}

\begin{proof}
During this proof we will use without further mention that for a closed
immersion $i : Z \to X$ the functor $i_*$ gives an equivalence between the
category of coherent modules on $Z$ and coherent modules on $X$ annihilated
by the ideal sheaf of $Z$, see
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-i-star-equivalence}.
In particular we think of
$$
\textit{Coh}_{\text{support proper over } A}(\mathcal{O}_{X_e})
\subset
\textit{Coh}_{\text{support proper over } A}(\mathcal{O}_X)
$$
as the full subcategory of consisting of modules annihilated by
$\mathcal{K}^e$ and
$$
\textit{Coh}_{\text{support proper over } A}(X_e, \mathcal{I}_e)
\subset
\textit{Coh}_{\text{support proper over } A}(X, \mathcal{I})
$$
as the full subcategory of objects annihilated by $\mathcal{K}^e$.
Moreover (1) tells us these two categories are equivalent under the
completion functor (\ref{equation-completion-functor-proper-over-A}).

\medskip\noindent
Applying this equivalence we get a coherent $\mathcal{O}_X$-module
$\mathcal{G}_e$ annihilated by $\mathcal{K}^e$ corresponding to the system
$(\mathcal{F}_n/\mathcal{K}^e\mathcal{F}_n)$ of
$\textit{Coh}_{\text{support proper over } A}(X, \mathcal{I})$. The maps
$\mathcal{F}_n/\mathcal{K}^{e + 1}\mathcal{F}_n \to
\mathcal{F}_n/\mathcal{K}^e\mathcal{F}_n$ correspond to canonical maps
$\mathcal{G}_{e + 1} \to \mathcal{G}_e$ which induce isomorphisms
$\mathcal{G}_{e + 1}/\mathcal{K}^e\mathcal{G}_{e + 1} \to \mathcal{G}_e$.
We obtain an object $(\mathcal{G}_e)$ of the category
$\textit{Coh}_{\text{support proper over } A}(X, \mathcal{K})$.
The map $\alpha$ induces a system of maps
$$
\mathcal{F}_n/\mathcal{K}^e\mathcal{F}_n
\longrightarrow
\mathcal{H}/(\mathcal{I}^n + \mathcal{K}^e)\mathcal{H}
$$
whence maps $\mathcal{G}_e \to \mathcal{H}/\mathcal{K}^e\mathcal{H}$
(by the equivalence of categories again).
Let $t \geq 1$ be an integer, which exists by assumption (2),
such that $\mathcal{K}^t$ annihilates the kernel and cokernel of all the maps
$\mathcal{F}_n \to \mathcal{H}/\mathcal{I}^n\mathcal{H}$.
Then $\mathcal{K}^{2t}$ annihilates the kernel and cokernel of the maps
$\mathcal{F}_n/\mathcal{K}^e\mathcal{F}_n \to
\mathcal{H}/(\mathcal{I}^n + \mathcal{K}^e)\mathcal{H}$
(details omitted; see Cohomology of Schemes,
Remark \ref{coherent-remark-inverse-systems-kernel-cokernel-annihilated-by}).
Whereupon we conclude that $\mathcal{K}^{4t}$ annihilates the kernel and
the cokernel of the maps
$$
\mathcal{G}_e
\longrightarrow
\mathcal{H}/\mathcal{K}^e\mathcal{H},
$$
(details omitted;  see Cohomology of Schemes,
Remark \ref{coherent-remark-inverse-systems-kernel-cokernel-annihilated-by}).
We apply Lemma \ref{lemma-existence-easy} to obtain a coherent
$\mathcal{O}_X$-module $\mathcal{F}$, a map
$a : \mathcal{F} \to \mathcal{H}$ and an isomorphism
$\beta : (\mathcal{G}_e) \to (\mathcal{F}/\mathcal{K}^e\mathcal{F})$
in $\textit{Coh}(X, \mathcal{K})$. Working backwards, for a given $n$
the triple
$(\mathcal{F}/\mathcal{I}^n\mathcal{F}, a \bmod \mathcal{I}^n, \beta
\bmod \mathcal{I}^n)$ is a triple as in the lemma for the morphism
$\alpha_n \bmod \mathcal{K}^e :
(\mathcal{F}_n/\mathcal{K}^e\mathcal{F}_n) \to
(\mathcal{H}/(\mathcal{I}^n + \mathcal{K}^e)\mathcal{H})$
of $\textit{Coh}(X, \mathcal{K})$. Thus the uniqueness in
Lemma \ref{lemma-existence-easy}
gives a canonical isomorphism
$\mathcal{F}/\mathcal{I}^n\mathcal{F} \to \mathcal{F}_n$
compatible with all the morphisms in sight.

\medskip\noindent
To finish the proof of the lemma we still have to show that the
support of $\mathcal{F}$ is proper over $A$.
By construction the kernel of $a : \mathcal{F} \to \mathcal{H}$
is annihilated by a power of $\mathcal{K}$. Hence the support of
this kernel is contained in the support of $\mathcal{G}_1$. Since
$\mathcal{G}_1$ is an object of
$\textit{Coh}_{\text{support proper over } A}(\mathcal{O}_{X_1})$
we see this is proper over $A$. Combined with the fact that the
support of $\mathcal{H}$ is proper over $A$ we conclude that the
support of $\mathcal{F}$ is proper over $A$ by
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-union-closed-proper-over-base}.
\end{proof}

\begin{lemma}
\label{lemma-inverse-systems-push-pull}
Let $S$ be a scheme. Let $f : X \to Y$ be a representable
proper morphism of Noetherian algebraic spaces over $S$. Let
$\mathcal{J}, \mathcal{K} \subset \mathcal{O}_Y$
be quasi-coherent sheaves of ideals.
Assume $f$ is an isomorphism over $V = Y \setminus V(\mathcal{K})$.
Set $\mathcal{I} = f^{-1}\mathcal{J} \mathcal{O}_X$.
Let $(\mathcal{G}_n)$ be an object of $\textit{Coh}(Y, \mathcal{J})$,
let $\mathcal{F}$ be a coherent $\mathcal{O}_X$-module, and let
$\beta : (f^*\mathcal{G}_n)  \to \mathcal{F}^\wedge$ be an isomorphism in
$\textit{Coh}(X, \mathcal{I})$. Then there exists a map
$$
\alpha :
(\mathcal{G}_n)
\longrightarrow
(f_*\mathcal{F})^\wedge
$$
in $\textit{Coh}(Y, \mathcal{J})$ whose kernel and cokernel
are annihilated by a power of $\mathcal{K}$.
\end{lemma}

\begin{proof}
Since $f$ is a proper morphism we see that $f_*\mathcal{F}$ is a coherent
$\mathcal{O}_Y$-module (Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-proper-pushforward-coherent}).
Thus the statement of the lemma makes sense. Consider the compositions
$$
\gamma_n : \mathcal{G}_n \to
f_*f^*\mathcal{G}_n \to
f_*(\mathcal{F}/\mathcal{I}^n\mathcal{F}).
$$
Here the first map is the adjunction map and the second is $f_*\beta_n$.
We claim that there exists a unique $\alpha$ as in the lemma
such that the compositions
$$
\mathcal{G}_n \xrightarrow{\alpha_n}
f_*\mathcal{F}/\mathcal{J}^nf_*\mathcal{F} \to
f_*(\mathcal{F}/\mathcal{I}^n\mathcal{F})
$$
equal $\gamma_n$ for all $n$. Because of the uniqueness and \'etale
descent for $\textit{Coh}(Y, \mathcal{J})$ it suffices
to prove this \'etale locally on $Y$. Thus we may assume $Y$
is the spectrum of a Noetherian ring. As $f$ is representable
we see that $X$ is a scheme as well. Thus we reduce to the case of
schemes, see proof of
Cohomology of Schemes, Lemma \ref{coherent-lemma-inverse-systems-push-pull}.
\end{proof}

\begin{theorem}[Grothendieck's existence theorem]
\label{theorem-grothendieck-existence}
In Situation \ref{situation-existence} the functor
(\ref{equation-completion-functor-proper-over-A})
is an equivalence.
\end{theorem}

\begin{proof}
We will use the equivalence of categories of
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-i-star-equivalence}
without further mention in the proof of the theorem.
By Lemma \ref{lemma-fully-faithful} the functor is fully faithful.
Thus we need to prove the functor is essentially surjective.

\medskip\noindent
Consider the collection $\Xi$ of quasi-coherent sheaves of ideals
$\mathcal{K} \subset \mathcal{O}_X$ such that the statement holds
for every object $(\mathcal{F}_n)$ of
$\textit{Coh}_{\text{support proper over }A}(X, \mathcal{I})$
annihilated by $\mathcal{K}$. We want to show $(0)$ is in $\Xi$.
If not, then since $X$ is Noetherian there exists a maximal
quasi-coherent sheaf of ideals $\mathcal{K}$ not in $\Xi$, see
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-acc-coherent}.
After replacing $X$ by the closed subscheme of $X$
corresponding to $\mathcal{K}$ we may assume that every nonzero
$\mathcal{K}$ is in $\Xi$. Let $(\mathcal{F}_n)$ be an object of
$\textit{Coh}_{\text{support proper over }A}(X, \mathcal{I})$.
We will show that this object is in the essential image, thereby
completing the proof of the theorem.

\medskip\noindent
Apply Chow's lemma (Lemma \ref{lemma-chow-noetherian-separated})
to find a proper surjective morphism $f : Y \to X$ which is an isomorphism
over a dense open $U \subset X$ such that $Y$ is H-quasi-projective
over $A$. Note that $Y$ is a scheme and $f$ representable.
Choose an open immersion $j : Y \to Y'$ with $Y'$ projective over $A$, see
Morphisms, Lemma \ref{morphisms-lemma-H-quasi-projective-open-H-projective}.
Let $T_n$ be the scheme theoretic support of $\mathcal{F}_n$.
Note that $|T_n| = |T_1|$, hence $T_n$ is proper over $A$ for all $n$
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-image-proper-is-proper}).
Then $f^*\mathcal{F}_n$ is supported on the closed subscheme
$f^{-1}T_n$ which is proper over $A$ (by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-proper}
and properness of $f$).
In particular, the composition $f^{-1}T_n \to Y \to Y'$ is closed
(Morphisms, Lemma \ref{morphisms-lemma-image-proper-scheme-closed}).
Let $T'_n \subset Y'$ be the corresponding closed subscheme;
it is contained in the open subscheme $Y$ and equal to $f^{-1}T_n$
as a closed subscheme of $Y$. Let $\mathcal{F}_n'$
be the coherent $\mathcal{O}_{Y'}$-module corresponding to
$f^*\mathcal{F}_n$ viewed as a coherent module on $Y'$ via
the closed immersion $f^{-1}T_n = T'_n \subset Y'$.
Then $(\mathcal{F}_n')$
is an object of $\textit{Coh}(Y', I\mathcal{O}_{Y'})$.
By the projective case of Grothendieck's existence theorem
(Cohomology of Schemes, Lemma \ref{coherent-lemma-existence-projective})
there exists a coherent $\mathcal{O}_{Y'}$-module
$\mathcal{F}'$ and an isomorphism
$(\mathcal{F}')^\wedge \cong (\mathcal{F}'_n)$ in
$\textit{Coh}(Y', I\mathcal{O}_{Y'})$.
Let $Z' \subset Y'$ be the scheme theoretic support of $\mathcal{F}'$.
Since $\mathcal{F}'/I\mathcal{F}' = \mathcal{F}'_1$ we see
that $Z' \cap V(I\mathcal{O}_{Y'}) = T'_1$ set-theoretically.
The structure morphism $p' : Y' \to \Spec(A)$ is proper, hence
$p'(Z' \cap (Y' \setminus Y))$ is closed in $\Spec(A)$.
If nonempty, then it would contain a point of $V(I)$
as $I$ is contained in the Jacobson radical of $A$
(Algebra, Lemma \ref{algebra-lemma-radical-completion}).
But we've seen above that $Z' \cap (p')^{-1}V(I) = T'_1 \subset Y$
hence we conclude that $Z' \subset Y$. Thus $\mathcal{F}'|_Y$
is supported on a closed subscheme of $Y$ proper over $A$.

\medskip\noindent
Let $\mathcal{K}$ be the quasi-coherent sheaf of ideals cutting
out the reduced complement $X \setminus U$.
By Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-proper-pushforward-coherent}
the $\mathcal{O}_X$-module $\mathcal{H} = f_*\mathcal{F}'$ is coherent
and by Lemma \ref{lemma-inverse-systems-push-pull}
there exists a morphism $\alpha : (\mathcal{F}_n) \to \mathcal{H}^\wedge$
in the category $\textit{Coh}_{\text{support proper over } A}(X, \mathcal{I})$
whose kernel and cokernel are annihilated by a power of $\mathcal{K}$.
Let $Z_0 \subset X$ be the scheme theoretic support of $\mathcal{H}$.
It is clear that $|Z_0| \subset f(|Z'|)$. Hence
$Z_0 \to \Spec(A)$ is proper
(Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-image-proper-is-proper}).
Thus $\mathcal{H}$ is an object of 
$\textit{Coh}_{\text{support proper over } A}(\mathcal{O}_X)$.
Since each of the sheaves of ideals $\mathcal{K}^e$ is an element of
$\Xi$ we see that the assumptions of Lemma \ref{lemma-existence-tricky}
are satisfied and we conclude.
\end{proof}

\begin{remark}[Unwinding Grothendieck's existence theorem]
\label{remark-reformulate-existence-theorem}
Let $A$ be a Noetherian ring complete with respect to an ideal $I$.
Write $S = \Spec(A)$ and $S_n = \Spec(A/I^n)$.
Let $X \to S$ be a morphism of algebraic spaces that is separated and
of finite type. For $n \geq 1$ we set $X_n = X \times_S S_n$.
Picture:
$$
\xymatrix{
X_1 \ar[r]_{i_1} \ar[d] & X_2 \ar[r]_{i_2} \ar[d] & X_3 \ar[r] \ar[d] &
\ldots & X \ar[d] \\
S_1 \ar[r] & S_2 \ar[r] & S_3 \ar[r] & \ldots & S
}
$$
In this situation we consider systems $(\mathcal{F}_n, \varphi_n)$
where
\begin{enumerate}
\item $\mathcal{F}_n$ is a coherent $\mathcal{O}_{X_n}$-module,
\item $\varphi_n : i_n^*\mathcal{F}_{n + 1} \to \mathcal{F}_n$
is an isomorphism, and
\item $\text{Supp}(\mathcal{F}_1)$ is proper over $S_1$.
\end{enumerate}
Theorem \ref{theorem-grothendieck-existence} says that the
completion functor
$$
\begin{matrix}
\text{coherent }\mathcal{O}_X\text{-modules }\mathcal{F} \\
\text{with support proper over }A
\end{matrix}
\quad
\longrightarrow
\quad
\begin{matrix}
\text{systems }(\mathcal{F}_n) \\
\text{as above}
\end{matrix}
$$
is an equivalence of categories. In the special case that $X$ is
proper over $A$ we can omit the conditions on the supports.
\end{remark}







\section{Grothendieck's algebraization theorem}
\label{section-algebraization}

\noindent
This section is the analogue of
Cohomology of Schemes, Section \ref{coherent-section-algebraization}.
However, this section is missing the result on algebraization of deformations
of proper algebraic spaces endowed with ample invertible sheaves, as a
proper algebraic space which comes with an ample invertible sheaf is
already a scheme. We do have an algebraization result on proper
algebraic spaces of relative dimension $1$.
Our first result is a translation of Grothendieck's existence
theorem in terms of closed subschemes and finite morphisms.

\begin{lemma}
\label{lemma-algebraize-formal-closed-subscheme}
Let $A$ be a Noetherian ring complete with respect to an ideal $I$.
Write $S = \Spec(A)$ and $S_n = \Spec(A/I^n)$.
Let $X \to S$ be a morphism of algebraic spaces that is separated
and of finite type.
For $n \geq 1$ we set $X_n = X \times_S S_n$.
Suppose given a commutative diagram
$$
\xymatrix{
Z_1 \ar[r] \ar[d] & Z_2 \ar[r] \ar[d] & Z_3 \ar[r] \ar[d] & \ldots \\
X_1 \ar[r]^{i_1} & X_2 \ar[r]^{i_2} & X_3 \ar[r] & \ldots
}
$$
of algebraic spaces with cartesian squares. Assume that
\begin{enumerate}
\item $Z_1 \to X_1$ is a closed immersion, and
\item $Z_1 \to S_1$ is proper.
\end{enumerate}
Then there exists a closed immersion of algebraic spaces $Z \to X$ such that
$Z_n = Z \times_S S_n$ for all $n \geq 1$. Moreover, $Z$ is proper over $S$.
\end{lemma}

\begin{proof}
Let's write $j_n : Z_n \to X_n$ for the vertical morphisms.
As the squares in the statement are cartesian
we see that the base change of $j_n$ to $X_1$ is $j_1$.
Thus Limits of Spaces, Lemma
\ref{spaces-limits-lemma-check-closed-infinitesimally}
shows that $j_n$ is a closed immersion.
Set $\mathcal{F}_n = j_{n, *}\mathcal{O}_{Z_n}$, so that
$j_n^\sharp$ is a surjection $\mathcal{O}_{X_n} \to \mathcal{F}_n$.
Again using that the squares are cartesian we see that
the pullback of $\mathcal{F}_{n + 1}$ to $X_n$ is $\mathcal{F}_n$.
Hence Grothendieck's existence theorem, as reformulated in
Remark \ref{remark-reformulate-existence-theorem},
tells us there exists a map
$\mathcal{O}_X \to \mathcal{F}$
of coherent $\mathcal{O}_X$-modules whose restriction to
$X_n$ recovers $\mathcal{O}_{X_n} \to \mathcal{F}_n$.
Moreover, the support of $\mathcal{F}$ is proper over $S$.
As the completion functor is exact (Lemma \ref{lemma-exact})
we see that $\mathcal{O}_X \to \mathcal{F}$
is surjective. Thus $\mathcal{F} = \mathcal{O}_X/\mathcal{J}$
for some quasi-coherent sheaf of ideals $\mathcal{J}$.
Setting $Z = V(\mathcal{J})$ finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-algebraize-formal-algebraic-space-finite-over-proper}
Let $A$ be a Noetherian ring complete with respect to an ideal $I$.
Write $S = \Spec(A)$ and $S_n = \Spec(A/I^n)$.
Let $X \to S$ be a morphism of algebraic spaces that is separated
and of finite type.
For $n \geq 1$ we set $X_n = X \times_S S_n$.
Suppose given a commutative diagram
$$
\xymatrix{
Y_1 \ar[r] \ar[d] & Y_2 \ar[r] \ar[d] & Y_3 \ar[r] \ar[d] & \ldots \\
X_1 \ar[r]^{i_1} & X_2 \ar[r]^{i_2} & X_3 \ar[r] & \ldots
}
$$
of algebraic spaces with cartesian squares. Assume that
\begin{enumerate}
\item $Y_1 \to X_1$ is a finite morphism, and
\item $Y_1 \to S_1$ is proper.
\end{enumerate}
Then there exists a finite morphism of algebraic spaces $Y \to X$ such that
$Y_n = Y \times_S S_n$ for all $n \geq 1$. Moreover, $Y$ is proper over $S$.
\end{lemma}

\begin{proof}
Let's write $f_n : Y_n \to X_n$ for the vertical morphisms.
As the squares in the statement are cartesian
we see that the base change of $f_n$ to $X_1$ is $f_1$.
Thus Lemma \ref{lemma-thicken-property-morphisms-cartesian}
shows that $f_n$ is a finite morphism.
Set $\mathcal{F}_n = f_{n, *}\mathcal{O}_{Y_n}$.
Using that the squares are cartesian we see that
the pullback of $\mathcal{F}_{n + 1}$ to $X_n$ is $\mathcal{F}_n$.
Hence Grothendieck's existence theorem, as reformulated in
Remark \ref{remark-reformulate-existence-theorem},
tells us there exists a coherent $\mathcal{O}_X$-module $\mathcal{F}$
whose restriction to $X_n$ recovers $\mathcal{F}_n$.
Moreover, the support of $\mathcal{F}$ is proper over $S$.
As the completion functor is fully faithful
(Theorem \ref{theorem-grothendieck-existence})
we see that the multiplication maps
$\mathcal{F}_n \otimes_{\mathcal{O}_{X_n}} \mathcal{F}_n \to
\mathcal{F}_n$ fit together to give an algebra structure on $\mathcal{F}$.
Setting $Y = \underline{\Spec}_X(\mathcal{F})$ finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-algebraize-morphism}
Let $A$ be a Noetherian ring complete with respect to an ideal $I$.
Write $S = \Spec(A)$ and $S_n = \Spec(A/I^n)$. Let $X$, $Y$ be algebraic
spaces over $S$. For $n \geq 1$ we set $X_n = X \times_S S_n$ and
$Y_n = Y \times_S S_n$. Suppose given a compatible system of
commutative diagrams
$$
\xymatrix{
& & X_{n + 1} \ar[rd] \ar[rr]_{g_{n + 1}} & & Y_{n + 1} \ar[ld] \\
X_n \ar[rru] \ar[rd] \ar[rr]_{g_n} & & Y_n \ar[rru] \ar[ld] & S_{n + 1} \\
& S_n \ar[rru]
}
$$
Assume that
\begin{enumerate}
\item $X \to S$ is proper, and
\item $Y \to S$ is separated of finite type.
\end{enumerate}
Then there exists a unique morphism of algebraic spaces $g : X \to Y$
over $S$ such that $g_n$ is the base change of $g$ to $S_n$.
\end{lemma}

\begin{proof}
The morphisms $(1, g_n) : X_n \to X_n \times_S Y_n$ are closed immersions
because $Y_n \to S_n$ is separated
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-section-immersion}).
Thus by Lemma \ref{lemma-algebraize-formal-closed-subscheme}
there exists a closed subspace $Z \subset X \times_S Y$
proper over $S$ whose base change to $S_n$ recovers
$X_n \subset X_n \times_S Y_n$. The first projection $p : Z \to X$
is a proper morphism (as $Z$ is proper over $S$, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-permanence})
whose base change to $S_n$ is an isomorphism for all $n$.
In particular, $p : Z \to X$ is quasi-finite on an open subspace
of $Z$ containing every point of $Z_0$ for example by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-locally-finite-type-quasi-finite-part}.
As $Z$ is proper over $S$ this open neighbourhood is all of $Z$.
We conclude that $p : Z \to X$ is finite by Zariski's main theorem
(for example apply
Lemma \ref{lemma-quasi-finite-separated-pass-through-finite}
and use properness of $Z$ over $X$ to see that the immersion is
a closed immersion). Applying the equivalence of
Theorem \ref{theorem-grothendieck-existence}
we see that $p_*\mathcal{O}_Z = \mathcal{O}_X$ as this is true
modulo $I^n$ for all $n$. Hence $p$ is an isomorphism and we obtain
the morphism $g$ as the composition $X \cong Z \to Y$.
We omit the proof of uniqueness.
\end{proof}

\begin{remark}
\label{remark-weaken-separation-axioms-question}
We can ask if in Grothendieck's algebraization theorem (in the form
of Lemma \ref{lemma-algebraize-morphism}), we can get
by with weaker separation axioms on the target. Let us be more precise.
Let $A$, $I$, $S$, $S_n$, $X$, $Y$, $X_n$, $Y_n$, and $g_n$ be as in
the statement of Lemma \ref{lemma-algebraize-morphism} and assume that
\begin{enumerate}
\item $X \to S$ is proper, and
\item $Y \to S$ is locally of finite type.
\end{enumerate}
Does there exist a morphism of algebraic spaces $g : X \to Y$
over $S$ such that $g_n$ is the base change of $g$ to $S_n$?
We don't know the answer in general; if you do please email
\href{mailto:stacks.project@gmail.com}{stacks.project@gmail.com}.
If $Y \to S$ is separated, then the result
holds by the lemma (there is an immediate reduction to the case
where $X$ is finite type over $S$, by choosing a quasi-compact
open containing the image of $g_1$). If we only assume $Y \to S$
is quasi-separated, then the result is true as well. First, as before
we may assume $Y$ is quasi-compact as well as quasi-separated.
Then we can use either \cite{Bhatt-Algebraize} or from
\cite{Hall-Rydh-coherent} to algebraize $(g_n)$. Namely, to apply
the first reference, we use
$$
D_{perf}(X) \to \lim D_{perf}(X_n)
\xrightarrow{\lim Lg_n^*}
\lim D_{perf}(Y_n) = D_{perf}(Y)
$$
where the last step uses a Grothendieck existence result for
the derived category of the proper algebraic space $Y$ over $R$
(compare with
Flatness on Spaces, Remark \ref{spaces-flat-remark-correct-generality}).
The paper cited shows that
this arrow determines a morphism $Y \to X$ as desired. To apply the
second reference we use the same argument with coherent modules:
$$
\textit{Coh}(\mathcal{O}_X) \to \lim \textit{Coh}(\mathcal{O}_{X_n})
\xrightarrow{\lim g_n^*}
\lim \textit{Coh}(\mathcal{O}_{Y_n}) = \textit{Coh}(\mathcal{O}_Y)
$$
where the final equality is a consequence of Grothendieck's
existence theorem (Theorem \ref{theorem-grothendieck-existence}).
The second reference tells us that this functor corresponds to a
morphism $Y \to X$ over $R$. If we ever need this generalization
we will precisely state and carefully prove the result here.
\end{remark}

\begin{lemma}
\label{lemma-formal-algebraic-space-proper-reldim-1}
Let $(A, \mathfrak m, \kappa)$ be a complete local Noetherian ring.
Set $S = \Spec(A)$ and $S_n = \Spec(A/\mathfrak m^n)$.
Consider a commutative diagram
$$
\xymatrix{
X_1 \ar[r]_{i_1} \ar[d] & X_2 \ar[r]_{i_2} \ar[d] & X_3 \ar[r] \ar[d] &
\ldots \\
S_1 \ar[r] & S_2 \ar[r] & S_3 \ar[r] & \ldots
}
$$
of algebraic spaces with cartesian squares. If $\dim(X_1) \leq 1$,
then there exists a projective morphism of schemes $X \to S$
and isomorphisms $X_n \cong X \times_S S_n$ compatible with $i_n$.
\end{lemma}

\begin{proof}
By Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-codim-1-point-in-schematic-locus}
the algebraic space $X_1$ is a scheme. Hence $X_1$
is a proper scheme of dimension $\leq 1$ over $\kappa$.
By Varieties, Lemma \ref{varieties-lemma-dim-1-proper-projective}
we see that $X_1$ is H-projective over $\kappa$.
Let $\mathcal{L}_1$ be an ample invertible sheaf on $X_1$.

\medskip\noindent
We are going to show that $\mathcal{L}_1$ lifts to a compatible system
$\{\mathcal{L}_n\}$ of invertible sheaves on $\{X_n\}$.
Observe that $X_n$ is a scheme too by Lemma \ref{lemma-thickening-scheme}.
Recall that $X_1 \to X_n$ induces homeomorphisms of underlying
topological spaces. In the rest of the proof we do not distinguish
between sheaves on $X_n$ and sheaves on $X_1$.
Suppose, given a lift $\mathcal{L}_n$ to $X_n$. We consider
the exact sequence
$$
1 \to
(1 + \mathfrak m^n\mathcal{O}_{X_{n + 1}})^* \to
\mathcal{O}_{X_{n + 1}}^* \to \mathcal{O}_{X_n}^* \to 1
$$
of sheaves on $X_{n + 1}$. The class of $\mathcal{L}_n$ in
$H^1(X_n, \mathcal{O}_{X_n}^*)$ (see
Cohomology, Lemma \ref{cohomology-lemma-h1-invertible})
can be lifted to an element of $H^1(X_{n + 1}, \mathcal{O}_{X_{n + 1}}^*)$
if and only if the obstruction in
$H^2(X_{n + 1}, (1 + \mathfrak m^n\mathcal{O}_{X_{n + 1}})^*)$
is zero. As $X_1$ is a Noetherian scheme of dimension $\leq 1$
this cohomology group vanishes (Cohomology, Proposition
\ref{cohomology-proposition-vanishing-Noetherian}).

\medskip\noindent
By Grothendieck's algebraization theorem
(Cohomology of Schemes, Theorem \ref{coherent-theorem-algebraization})
we find a projective morphism of schemes $X \to S = \Spec(A)$
and a compatible system of isomorphisms $X_n = S_n \times_S X$.
\end{proof}

\begin{lemma}
\label{lemma-projective-over-complete}
Let $(A, \mathfrak m, \kappa)$ be a complete Noetherian local ring.
Let $X$ be an algebraic space over $\Spec(A)$.
If $X \to \Spec(A)$ is proper and $\dim(X_\kappa) \leq 1$, then
$X$ is a scheme projective over $A$.
\end{lemma}

\begin{proof}
Set $X_n = X \times_{\Spec(A)} \Spec(A/\mathfrak m^n)$.
By Lemma \ref{lemma-formal-algebraic-space-proper-reldim-1}
there exists a projective morphism $Y \to \Spec(A)$
and compatible isomorphisms
$Y \times_{\Spec(A)} \Spec(A/\mathfrak m^n) \cong
X \times_{\Spec(A)} \Spec(A/\mathfrak m^n)$.
By Lemma \ref{lemma-algebraize-morphism}
we see that $X \cong Y$ and the proof is complete.
\end{proof}










\section{Regular immersions}
\label{section-regular-immersions}

\noindent
This section is the analogue of
Divisors, Section \ref{divisors-section-regular-immersions}
for morphisms of algebraic spaces. The reader is encouraged to read up
on regular immersions of schemes in that section first.

\medskip\noindent
In
Divisors, Section \ref{divisors-section-regular-immersions}
we defined four types of regular immersions for morphisms of schemes.
Of these only three are (as far as we know) local on the target for
the \'etale topology; as usual plain old regular immersions aren't.
This is why for morphisms of algebraic spaces we cannot actually define
regular immersions. (These kinds of annoyances prompted Grothendieck
and his school to replace original notion of a regular immersion by a
Koszul-regular immersions, see
\cite[Exposee VII, Definition 1.4]{SGA6}.)
But we can define Koszul-regular, $H_1$-regular, and quasi-regular immersions.
Another remark is that since Koszul-regular immersions are not preserved by
arbitrary base change, we cannot use the strategy of
Morphisms of Spaces, Section \ref{spaces-morphisms-section-representable}
to define them. Similarly, as Koszul-regular immersions are not \'etale local
on the source, we cannot use
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-local-source-target}
to define them either. We replace this lemma instead by the
following.

\begin{lemma}
\label{lemma-representable-etale-local-target}
Let $\mathcal{P}$ be a property of morphisms of schemes which is \'etale
local on the target. Let $S$ be a scheme.
Let $f : X \to Y$ be a representable morphism of algebraic spaces over $S$.
Consider commutative diagrams
$$
\xymatrix{
X \times_Y V \ar[d] \ar[r] & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $V$ is a scheme and $V \to Y$ is \'etale.
The following are equivalent
\begin{enumerate}
\item for any diagram as above the projection $X \times_Y V \to V$
has property $\mathcal{P}$, and
\item for some diagram as above with $V \to Y$ surjective
the projection $X \times_Y V \to V$ has property $\mathcal{P}$.
\end{enumerate}
If $X$ and $Y$ are representable, then this is also equivalent to
$f$ (as a morphism of schemes) having property $\mathcal{P}$.
\end{lemma}

\begin{proof}
Let us prove the equivalence of (1) and (2).
The implication (1) $\Rightarrow$ (2) is immediate.
Assume
$$
\xymatrix{
X \times_Y V \ar[d] \ar[r] & V \ar[d] \\
X \ar[r]^f & Y
}
\quad\quad
\xymatrix{
X \times_Y V' \ar[d] \ar[r] & V' \ar[d] \\
X \ar[r]^f & Y
}
$$
are two diagrams as in the lemma. Assume $V \to Y$ is
surjective and $X \times_Y V \to V$ has property $\mathcal{P}$.
To show that (2) implies (1) we have to prove that
$X \times_Y V' \to V'$ has $\mathcal{P}$. To do
this consider the diagram
$$
\xymatrix{
X \times_Y V \ar[d] &
(X \times_Y V) \times_X (X \times_Y V') \ar[l] \ar[d] \ar[r] &
X \times_Y V' \ar[d] \\
V &
V \times_Y V' \ar[l] \ar[r] &
V'
}
$$
By our assumption that $\mathcal{P}$ is \'etale local on the source,
we see that $\mathcal{P}$ is preserved under \'etale base change, see
Descent, Lemma \ref{descent-lemma-pullback-property-local-target}.
Hence if the left vertical arrow has $\mathcal{P}$ the so does
the middle vertical arrow. Since $U \times_X U' \to U'$ is surjective
and \'etale (hence defines an \'etale covering of $U'$)
this implies (as $\mathcal{P}$ is assumed local for the \'etale topology
on the target) that the left vertical arrow has $\mathcal{P}$.

\medskip\noindent
If $X$ and $Y$ are representable, then we can take
$\text{id}_Y : Y \to Y$ as our \'etale covering to see the
final statement of the lemma is true.
\end{proof}

\noindent
Note that ``being a Koszul-regular (resp.\ $H_1$-regular, resp.\ quasi-regular)
immersion'' is a property of morphisms of schemes which is fpqc local on the
target, see
Descent, Lemma \ref{descent-lemma-descending-property-regular-immersion}.
Hence the following definition now makes sense.

\begin{definition}
\label{definition-regular-immersion}
Let $S$ be a scheme. Let $i : X \to Y$ be a morphism of algebraic
spaces over $S$.
\begin{enumerate}
\item We say $i$ is a {\it Koszul-regular immersion} if $i$ is representable
and the equivalent conditions of
Lemma \ref{lemma-representable-etale-local-target}
hold with $\mathcal{P}(f) =$``$f$ is a Koszul-regular immersion''.
\item We say $i$ is an {\it $H_1$-regular immersion} if $i$ is representable
and the equivalent conditions of
Lemma \ref{lemma-representable-etale-local-target}
hold with $\mathcal{P}(f) =$``$f$ is an $H_1$-regular immersion''.
\item We say $i$ is a {\it quasi-regular immersion} if $i$ is representable
and the equivalent conditions of
Lemma \ref{lemma-representable-etale-local-target}
hold with $\mathcal{P}(f) =$``$f$ is a quasi-regular immersion''.
\end{enumerate}
\end{definition}

\begin{lemma}
\label{lemma-regular-quasi-regular-immersion}
Let $S$ be a scheme.
Let $i : Z \to X$ be an immersion of algebraic spaces over $S$.
We have the following implications:
$i$ is Koszul-regular $\Rightarrow$
$i$ is $H_1$-regular $\Rightarrow$
$i$ is quasi-regular.
\end{lemma}

\begin{proof}
Via the definition this lemma immediately reduces to
Divisors, Lemma \ref{divisors-lemma-regular-quasi-regular-immersion}.
\end{proof}

\begin{lemma}
\label{lemma-regular-immersion-noetherian}
Let $S$ be a scheme.
Let $i : Z \to X$ be an immersion of algebraic spaces over $S$.
Assume $X$ is locally Noetherian. Then
$i$ is Koszul-regular $\Leftrightarrow$
$i$ is $H_1$-regular $\Leftrightarrow$
$i$ is quasi-regular.
\end{lemma}

\begin{proof}
Via Definition \ref{definition-regular-immersion}
(and the definition of a locally Noetherian algebraic space
in Properties of Spaces, Section
\ref{spaces-properties-section-types-properties})
this immediately translates to the case of schemes which is
Divisors, Lemma \ref{divisors-lemma-regular-immersion-noetherian}.
\end{proof}

\begin{lemma}
\label{lemma-flat-base-change-regular-immersion}
\begin{slogan}
Regular immersions are stable under flat base change.
\end{slogan}
Let $S$ be a scheme. Let $i : Z \to X$ be a Koszul-regular,
$H_1$-regular, or quasi-regular immersion of algebraic spaces over $S$.
Let $X' \to X$ be a flat morphism of algebraic spaces over $S$.
Then the base change $i' : Z \times_X X' \to X'$ is a Koszul-regular,
$H_1$-regular, or quasi-regular immersion.
\end{lemma}

\begin{proof}
Via Definition \ref{definition-regular-immersion}
(and the definition of a flat morphism of algebraic spaces
in Morphisms of Spaces, Section
\ref{spaces-morphisms-section-flat})
this lemma reduces to the case of schemes, see
Divisors, Lemma \ref{divisors-lemma-flat-base-change-regular-immersion}.
\end{proof}

\begin{lemma}
\label{lemma-quasi-regular-immersion}
Let $S$ be a scheme. Let $i : Z \to X$ be an immersion of algebraic spaces
over $S$. Then $i$ is a quasi-regular immersion if and only if the following
conditions are satisfied
\begin{enumerate}
\item $i$ is locally of finite presentation,
\item the conormal sheaf $\mathcal{C}_{Z/X}$ is finite locally free, and
\item the map (\ref{equation-conormal-algebra-quotient}) is an isomorphism.
\end{enumerate}
\end{lemma}

\begin{proof}
Follows from the case of schemes
(Divisors, Lemma \ref{divisors-lemma-quasi-regular-immersion})
via \'etale localization (use Definition \ref{definition-regular-immersion}
and
Lemma \ref{lemma-etale-conormal-algebra}).
\end{proof}

\begin{lemma}
\label{lemma-transitivity-conormal-quasi-regular}
Let $S$ be a scheme. Let $Z \to Y \to X$ be immersions of algebraic spaces
over $S$. Assume that $Z \to Y$ is $H_1$-regular. Then the canonical
sequence of Lemma \ref{lemma-transitivity-conormal}
$$
0 \to i^*\mathcal{C}_{Y/X} \to
\mathcal{C}_{Z/X} \to
\mathcal{C}_{Z/Y} \to 0
$$
is exact and (\'etale) locally split.
\end{lemma}

\begin{proof}
Since $\mathcal{C}_{Z/Y}$ is finite locally free (see
Lemma \ref{lemma-quasi-regular-immersion}
and
Lemma \ref{lemma-regular-quasi-regular-immersion})
it suffices to prove that the sequence is exact.
It suffices to show that the first map is injective
as the sequence is already right exact in general.
After \'etale localization on $X$ this reduces to the case
of schemes, see
Divisors, Lemma \ref{divisors-lemma-transitivity-conormal-quasi-regular}.
\end{proof}

\noindent
A composition of quasi-regular immersions may not be quasi-regular, see
Algebra, Remark \ref{algebra-remark-join-quasi-regular-sequences}.
The other types of regular immersions are preserved under composition.

\begin{lemma}
\label{lemma-composition-regular-immersion}
Let $S$ be a scheme. Let $i : Z \to Y$ and $j : Y \to X$ be immersions of
algebraic spaces over $S$.
\begin{enumerate}
\item If $i$ and $j$ are Koszul-regular immersions, so is $j \circ i$.
\item If $i$ and $j$ are $H_1$-regular immersions, so is $j \circ i$.
\item If $i$ is an $H_1$-regular immersion and $j$ is a quasi-regular
immersion, then $j \circ i$ is a quasi-regular immersion.
\end{enumerate}
\end{lemma}

\begin{proof}
Immediate from the case of schemes, see
Divisors, Lemma \ref{divisors-lemma-composition-regular-immersion}.
\end{proof}

\begin{lemma}
\label{lemma-permanence-regular-immersion}
Let $S$ be a scheme. Let $i : Z \to Y$ and $j : Y \to X$ be immersions of
algebraic spaces over $S$. Assume that the sequence
$$
0 \to i^*\mathcal{C}_{Y/X} \to
\mathcal{C}_{Z/X} \to
\mathcal{C}_{Z/Y} \to 0
$$
of Lemma \ref{lemma-transitivity-conormal} is exact and locally split.
\begin{enumerate}
\item If $j \circ i$ is a quasi-regular immersion, so is $i$.
\item If $j \circ i$ is a $H_1$-regular immersion, so is $i$.
\item If both $j$ and $j \circ i$ are Koszul-regular immersions, so is $i$.
\end{enumerate}
\end{lemma}

\begin{proof}
Immediate from the case of schemes, see
Divisors, Lemma \ref{divisors-lemma-permanence-regular-immersion}.
\end{proof}

\begin{lemma}
\label{lemma-extra-permanence-regular-immersion-noetherian}
Let $S$ be a scheme. Let $i : Z \to Y$ and $j : Y \to X$ be immersions of
algebraic spaces over $S$. Assume $X$ is locally Noetherian.
The following are equivalent
\begin{enumerate}
\item $i$ and $j$ are Koszul regular immersions,
\item $i$ and $j \circ i$ are Koszul regular immersions,
\item $j \circ i$ is a Koszul regular immersion and the conormal sequence
$$
0 \to i^*\mathcal{C}_{Y/X} \to
\mathcal{C}_{Z/X} \to
\mathcal{C}_{Z/Y} \to 0
$$
is exact and locally split.
\end{enumerate}
\end{lemma}

\begin{proof}
Immediate from the case of schemes, see Divisors, Lemma
\ref{divisors-lemma-extra-permanence-regular-immersion-noetherian}.
\end{proof}














\section{Relative pseudo-coherence}
\label{section-relative-pseudo-coherence}

\noindent
This section is the analogue of
More on Morphisms, Section
\ref{more-morphisms-section-relative-pseudo-coherence}.
However, in the treatment of this material for
algebraic spaces we have decided to work exclusively
with objects in the derived category whose cohomology
sheaves are quasi-coherent. There are two reasons for this:
(1) it greatly simplifies the exposition and
(2) we currently have no use for the more general notion.

\begin{remark}
\label{remark-match-relative-pseudo-coherence}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of representable
algebraic spaces over $S$ which is locally of finite type. Let
$f_0 : X_0 \to Y_0$ be a morphism of schemes representing $f$
(awkward but temporary notation). Then $f_0$ is locally of finite type.
If $E$ is an object of $D_\QCoh(\mathcal{O}_X)$, then $E$
is the pullback of a unique object $E_0$ in $D_\QCoh(\mathcal{O}_{X_0})$, see
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site}.
In this situation the phrase ``$E$ is $m$-pseudo-coherent relative to $Y$''
will be taken to mean ``$E_0$ is $m$-pseudo-coherent relative to $Y_0$''
as defined in More on Morphisms, Section
\ref{more-morphisms-section-relative-pseudo-coherence}.
\end{remark}

\begin{lemma}
\label{lemma-qcoh-relative-pseudo-coherence-characterize}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$ which is locally of finite type. Let $m \in \mathbf{Z}$.
Let $E \in D_\QCoh(\mathcal{O}_X)$. With notation as explained in
Remark \ref{remark-match-relative-pseudo-coherence}
the following are equivalent:
\begin{enumerate}
\item for every commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
where $U$, $V$ are schemes and the vertical arrows are \'etale, the complex
$E|_U$ is $m$-pseudo-coherent relative to $V$,
\item for some commutative diagram as in (1) with $U \to X$
surjective, the complex $E|_U$ is $m$-pseudo-coherent relative to $V$,
\item for every commutative diagram as in (1) with $U$ and $V$
affine the complex $R\Gamma(U, E)$ of $\mathcal{O}_X(U)$-modules
is $m$-pseudo-coherent relative to $\mathcal{O}_Y(V)$.
\end{enumerate}
\end{lemma}

\begin{proof}
Part (1) implies (3) by More on Morphisms, Lemma
\ref{more-morphisms-lemma-qcoh-relative-pseudo-coherence-characterize}.

\medskip\noindent
Assume (3). Pick any commutative diagram as in (1) with $U \to X$ surjective.
Choose an affine open covering $V = \bigcup V_j$ and affine open coverings
$(U \to V)^{-1}(V_j) = \bigcup U_{ij}$. By (3) and More on Morphisms, Lemma
\ref{more-morphisms-lemma-qcoh-relative-pseudo-coherence-characterize}
we see that $E|_U$ is $m$-pseudo-coherent relative to $V$.
Thus (3) implies (2).

\medskip\noindent
Assume (2). Choose a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
where $U$, $V$ are schemes, the vertical arrows are \'etale, the
morphism $U \to X$ is surjective, and $E|_U$ is $m$-pseudo-coherent
relative to $V$. Next, suppose given a second commutative diagram
$$
\xymatrix{
U' \ar[d] \ar[r] & V' \ar[d] \\
X \ar[r] & Y
}
$$
with \'etale vertical arrows and $U', V'$ schemes. We want to show
that $E|_{U'}$ is $m$-pseudo-coherent relative to $V'$.
The morphism $U'' = U \times_X U' \to U'$ is surjective \'etale
and $U'' \to V'$ factors through $V'' = V' \times_Y V$ which
is \'etale over $V'$. Hence it suffices to show that $E|_{U''}$
is $m$-pseudo-coherent relative to $V''$, see
More on Morphisms, Lemmas
\ref{more-morphisms-lemma-relative-pseudo-coherent-descends-fppf} and
\ref{more-morphisms-lemma-relative-pseudo-coherent-post-compose}.
Using the second lemma once more it suffices to show that
$E|_{U''}$ is $m$-pseudo-coherent relative to $V$.
This is true by More on Morphisms, Lemma
\ref{more-morphisms-lemma-pull-relative-pseudo-coherent}
and the fact that an \'etale morphism of schemes is pseudo-coherent by
More on Morphisms, Lemma
\ref{more-morphisms-lemma-flat-finite-presentation-pseudo-coherent}.
\end{proof}

\begin{definition}
\label{definition-relative-pseudo-coherence}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of
algebraic spaces over $S$ which is locally of finite type.
Let $E$ be an object of $D_\QCoh(\mathcal{O}_X)$. Let $\mathcal{F}$ be a
quasi-coherent $\mathcal{O}_X$-module. Fix $m \in \mathbf{Z}$.
\begin{enumerate}
\item We say $E$ is {\it $m$-pseudo-coherent relative to $Y$}
if the equivalent conditions of
Lemma \ref{lemma-qcoh-relative-pseudo-coherence-characterize} are satisfied.
\item We say $E$ is {\it pseudo-coherent relative to $Y$}
if $E$ is $m$-pseudo-coherent relative to $Y$ for all $m \in \mathbf{Z}$.
\item We say $\mathcal{F}$ is {\it $m$-pseudo-coherent relative to $Y$} if
$\mathcal{F}$ viewed as an object of $D_\QCoh(\mathcal{O}_X)$ is
$m$-pseudo-coherent relative to $Y$.
\item We say $\mathcal{F}$ is {\it pseudo-coherent relative to $Y$} if
$\mathcal{F}$ viewed as an object of $D_\QCoh(\mathcal{O}_X)$ is
pseudo-coherent relative to $Y$.
\end{enumerate}
\end{definition}

\noindent
Most of the properties of pseudo-coherent complexes relative to a base
will follow immediately from the corresponding properties in the case
of schemes. We will add the relevant lemmas here as needed.

\begin{lemma}
\label{lemma-relative-pseudo-coherent-is-moot}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of
algebraic spaces over $S$. Let $E$ in $D_\QCoh(\mathcal{O}_X)$.
If $f$ is flat and locally of finite presentation, then
the following are equivalent
\begin{enumerate}
\item $E$ is pseudo-coherent relative to $Y$, and
\item $E$ is pseudo-coherent on $X$.
\end{enumerate}
\end{lemma}

\begin{proof}
By \'etale localization and the definitions we may assume
$X$ and $Y$ are schemes. For the case of schemes this follows
from More on Morphisms, Lemma
\ref{more-morphisms-lemma-check-relative-pseudo-coherence-on-charts}.
\end{proof}

















\section{Pseudo-coherent morphisms}
\label{section-pseudo-coherent}

\noindent
This section is the analogue of
More on Morphisms, Section \ref{more-morphisms-section-pseudo-coherent}
for morphisms of schemes. The reader is encouraged to read up
on pseudo-coherent morphisms of schemes in that section first.

\medskip\noindent
The property ``pseudo-coherent'' of morphisms of schemes is
\'etale local on the source-and-target. To see this use
More on Morphisms,
Lemmas \ref{more-morphisms-lemma-descending-property-pseudo-coherent} and
\ref{more-morphisms-lemma-pseudo-coherent-fppf-local-source}
and
Descent, Lemma \ref{descent-lemma-etale-local-source-target}.
By
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-local-source-target}
we may define the notion of a pseudo-coherent morphism of algebraic spaces as
follows and it agrees with the already existing notion defined in
More on Morphisms, Section \ref{more-morphisms-section-pseudo-coherent}
when the algebraic spaces in question are representable.

\begin{definition}
\label{definition-pseudo-coherent}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
\begin{enumerate}
\item We say $f$ is {\it pseudo-coherent} if the equivalent conditions of
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-local-source-target}
hold with $\mathcal{P} =$``pseudo-coherent''.
\item Let $x \in |X|$. We say $f$ is {\it pseudo-coherent at $x$} if
there exists an open neighbourhood $X' \subset X$ of $x$ such
that $f|_{X'} : X' \to Y$ is pseudo-coherent.
\end{enumerate}
\end{definition}

\noindent
Beware that a base change of a pseudo-coherent morphism is not
pseudo-coherent in general.

\begin{lemma}
\label{lemma-flat-base-change-pseudo-coherent}
A flat base change of a pseudo-coherent morphism is pseudo-coherent.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-flat-base-change-pseudo-coherent}.
\end{proof}

\begin{lemma}
\label{lemma-composition-pseudo-coherent}
A composition of pseudo-coherent morphisms is pseudo-coherent.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-composition-pseudo-coherent}.
\end{proof}

\begin{lemma}
\label{lemma-pseudo-coherent-finite-presentation}
A pseudo-coherent morphism is locally of finite presentation.
\end{lemma}

\begin{proof}
Immediate from the definitions.
\end{proof}

\begin{lemma}
\label{lemma-flat-finite-presentation-pseudo-coherent}
A flat morphism which is locally of finite presentation is pseudo-coherent.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-flat-finite-presentation-pseudo-coherent}.
\end{proof}

\begin{lemma}
\label{lemma-permanence-pseudo-coherent}
Let $f : X \to Y$ be a morphism of algebraic spaces pseudo-coherent
over a base algebraic space $B$. Then $f$ is pseudo-coherent.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-permanence-pseudo-coherent}.
\end{proof}

\begin{lemma}
\label{lemma-Noetherian-pseudo-coherent}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$. If $Y$ is locally Noetherian, then $f$ is pseudo-coherent if
and only if $f$ is locally of finite type.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-Noetherian-pseudo-coherent}.
\end{proof}








\section{Perfect morphisms}
\label{section-perfect}

\noindent
This section is the analogue of
More on Morphisms, Section \ref{more-morphisms-section-perfect}
for morphisms of schemes. The reader is encouraged to read up
on perfect morphisms of schemes in that section first.

\medskip\noindent
The property ``perfect'' of morphisms of schemes is
\'etale local on the source-and-target. To see this use
More on Morphisms,
Lemmas \ref{more-morphisms-lemma-descending-property-perfect} and
\ref{more-morphisms-lemma-perfect-fppf-local-source}
and
Descent, Lemma \ref{descent-lemma-etale-local-source-target}.
By
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-local-source-target}
we may define the notion of a perfect morphism of algebraic spaces as
follows and it agrees with the already existing notion defined in
More on Morphisms, Section \ref{more-morphisms-section-perfect}
when the algebraic spaces in question are representable.

\begin{definition}
\label{definition-perfect}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
\begin{enumerate}
\item We say $f$ is {\it perfect} if the equivalent conditions of
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-local-source-target}
hold with $\mathcal{P} =$``perfect''.
\item Let $x \in |X|$. We say $f$ is {\it perfect at $x$} if
there exists an open neighbourhood $X' \subset X$ of $x$ such
that $f|_{X'} : X' \to Y$ is perfect.
\end{enumerate}
\end{definition}

\noindent
Note that a perfect morphism is pseudo-coherent, hence locally of finite
presentation. Beware that a base change of a perfect morphism is not perfect
in general.

\begin{lemma}
\label{lemma-flat-base-change-perfect}
A flat base change of a perfect morphism is perfect.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-flat-base-change-perfect}.
\end{proof}

\begin{lemma}
\label{lemma-composition-perfect}
A composition of perfect morphisms is perfect.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-composition-perfect}.
\end{proof}

\begin{lemma}
\label{lemma-flat-finite-presentation-perfect}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces over
$S$. The following are equivalent
\begin{enumerate}
\item $f$ is flat and perfect, and
\item $f$ is flat and locally of finite presentation.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-flat-finite-presentation-perfect}.
\end{proof}

\begin{lemma}
\label{lemma-perfect-proper-perfect-direct-image}
Let $S$ be a scheme. Let $Y$ be a Noetherian algebraic space over $S$.
Let $f : X \to Y$ be a perfect proper morphism of algebraic spaces.
Let $E \in D(\mathcal{O}_X)$ be perfect. Then
$Rf_*E$ is a perfect object of $D(\mathcal{O}_Y)$.
\end{lemma}

\begin{proof}
We claim that Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-perfect-direct-image} applies.
Conditions (1) and (2) are immediate. Condition (3) is local
on $X$. Thus we may assume $X$ and $Y$ affine and $E$
represented by a strictly perfect complex of $\mathcal{O}_X$-modules.
Thus it suffices to show that $\mathcal{O}_X$ has finite
tor dimension as a sheaf of $f^{-1}\mathcal{O}_Y$-modules
on the \'etale site. By Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-tor-dimension-rel} it suffices to
check this on the Zariski site. This is equivalent to being perfect
for finite type morphisms of schemes by More on Morphisms,
Lemma \ref{more-morphisms-lemma-check-perfect-stalks}.
\end{proof}











\section{Local complete intersection morphisms}
\label{section-lci}

\noindent
This section is the analogue of
More on Morphisms, Section \ref{more-morphisms-section-lci}
for morphisms of schemes. The reader is encouraged to read up
on local complete intersection morphisms of schemes in that section first.

\medskip\noindent
The property ``being a local complete intersection morphism'' of morphisms
of schemes is \'etale local on the source-and-target. To see this use
More on Morphisms,
Lemmas \ref{more-morphisms-lemma-descending-property-lci} and
\ref{more-morphisms-lemma-lci-syntomic-local-source}
and
Descent, Lemma \ref{descent-lemma-etale-local-source-target}.
By
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-local-source-target}
we may define the notion of a local complete intersection morphism
of algebraic spaces as follows and it agrees with the already existing
notion defined in
More on Morphisms, Section \ref{more-morphisms-section-lci}
when the algebraic spaces in question are representable.

\begin{definition}
\label{definition-lci}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
\begin{enumerate}
\item We say $f$ is a {\it Koszul morphism}, or that $f$ is a
{\it local complete intersection morphism} if the equivalent conditions of
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-local-source-target}
hold with $\mathcal{P}(f) =$``$f$ is a local complete intersection morphism''.
\item Let $x \in |X|$. We say $f$ is {\it Koszul at $x$} if
there exists an open neighbourhood $X' \subset X$ of $x$ such
that $f|_{X'} : X' \to Y$ is a local complete intersection morphism.
\end{enumerate}
\end{definition}

\noindent
In some sense the defining property of a local complete intersection
morphism is the result of the following lemma.

\begin{lemma}
\label{lemma-lci}
Let $S$ be a scheme.
Let $f : X \to Y$ be a local complete intersection morphism
of algebraic spaces over $S$.
Let $P$ be an algebraic space smooth over $Y$.
Let $U \to X$ be an \'etale morphism of algebraic spaces
and let $i : U \to P$ an immersion of algebraic spaces over $Y$.
Picture:
$$
\xymatrix{
X \ar[rd] & U \ar[l] \ar[d] \ar[r]_i & P \ar[ld] \\
& Y
}
$$
Then $i$ is a Koszul-regular immersion of algebraic spaces.
\end{lemma}

\begin{proof}
Choose a scheme $V$ and a surjective \'etale morphism $V \to Y$.
Choose a scheme $W$ and a surjective \'etale morphism $W \to P \times_Y V$.
Set $U' = U \times_P W$, which is a scheme \'etale over $U$.
We have to show that $U' \to W$ is a Koszul-regular immersion of
schemes, see
Definition \ref{definition-regular-immersion}.
By
Definition \ref{definition-lci}
above the morphism of schemes $U' \to V$ is a local complete intersection
morphism. Hence the result follows from
More on Morphisms, Lemma \ref{more-morphisms-lemma-lci}.
\end{proof}

\noindent
It seems like a good idea to collect here some properties in common
with all Koszul morphisms.

\begin{lemma}
\label{lemma-lci-properties}
Let $S$ be a scheme. Let $f : X \to Y$ be a local complete intersection
morphism of algebraic spaces over $S$. Then
\begin{enumerate}
\item $f$ is locally of finite presentation,
\item $f$ is pseudo-coherent, and
\item $f$ is perfect.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-lci-properties}.
\end{proof}

\noindent
Beware that a base change of a Koszul morphism is not Koszul in general.

\begin{lemma}
\label{lemma-flat-base-change-lci}
A flat base change of a local complete intersection morphism is a
local complete intersection morphism.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-flat-base-change-lci}.
\end{proof}

\begin{lemma}
\label{lemma-composition-lci}
A composition of local complete intersection morphisms is a
local complete intersection morphism.
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-composition-lci}.
\end{proof}

\begin{lemma}
\label{lemma-flat-lci}
\begin{slogan}
Syntomic equals flat plus lci (for algebraic spaces).
\end{slogan}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The following are equivalent
\begin{enumerate}
\item $f$ is flat and a local complete intersection morphism, and
\item $f$ is syntomic.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted. Hint: Use the schemes version of this lemma, see
More on Morphisms,
Lemma \ref{more-morphisms-lemma-flat-lci}.
\end{proof}

\begin{lemma}
\label{lemma-regular-immersion-lci}
Let $S$ be a scheme. A Koszul-regular immersion of algebraic spaces
over $S$ is a local complete intersection morphism.
\end{lemma}

\begin{proof}
Let $i : X \to Y$ be a Koszul-regular immersion of algebraic spaces
over $S$. By definition there exists a surjective \'etale morphism
$V \to Y$ where $V$ is a scheme such that $X \times_Y V$ is a scheme
and the base change $X \times_Y V \to V$ is a Koszul-regular immersion of
schemes. By More on Morphisms, Lemma
\ref{more-morphisms-lemma-regular-immersion-lci} we see that
$X \times_Y V \to V$ is a local complete intersection morphism.
From Definition \ref{definition-lci} we conclude that $i$ is a
local complete intersection morphism of algebraic spaces.
\end{proof}

\begin{lemma}
\label{lemma-lci-permanence}
Let $S$ be a scheme. Let
$$
\xymatrix{
X \ar[rr]_f \ar[rd] & & Y \ar[ld] \\
& Z
}
$$
be a commutative diagram of morphisms of algebraic spaces over $S$.
Assume $Y \to Z$ is smooth and $X \to Z$ is a
local complete intersection morphism.
Then $f : X \to Y$ is a local complete intersection morphism.
\end{lemma}

\begin{proof}
Choose a scheme $W$ and a surjective \'etale morphism $W \to Z$.
Choose a scheme $V$ and a surjective \'etale morphism $V \to W \times_Z Y$.
Choose a scheme $U$ and a surjective \'etale morphism $U \to V \times_Y X$.
Then $U \to W$ is a local complete intersection morphism of schemes and
$V \to W$ is a smooth morphism of schemes. By the result for schemes
(More on Morphisms, Lemma \ref{more-morphisms-lemma-lci-permanence})
we conclude that $U \to V$ is a local complete intersection morphism.
By definition this means that $f$ is a local complete intersection morphism.
\end{proof}

\begin{lemma}
\label{lemma-descending-property-lci}
The property $\mathcal{P}(f) =$``$f$ is a local complete intersection
morphism'' is fpqc local on the base.
\end{lemma}

\begin{proof}
Let $S$ be a scheme. Let $f : X \to Y$ be a
morphism of algebraic spaces over $S$.
Let $\{Y_i \to Y\}$ be an fpqc covering
(Topologies on Spaces, Definition
\ref{spaces-topologies-definition-fpqc-covering}).
Let $f_i : X_i \to Y_i$ be the base change of $f$ by $Y_i \to Y$.
If $f$ is a local complete intersection morphism,
then each $f_i$ is a local complete intersection morphism
by Lemma \ref{lemma-flat-base-change-lci}.

\medskip\noindent
Conversely, assume each $f_i$ is a local complete intersection morphism.
We may replace the covering by a refinement (again because
flat base change preserves the property of being a
local complete intersection morphism). Hence we may assume
$Y_i$ is a scheme for each $i$, see
Topologies on Spaces, Lemma \ref{spaces-topologies-lemma-refine-fpqc-schemes}.
Choose a scheme $V$ and a surjective \'etale morphism $V \to Y$.
Choose a scheme $U$ and a surjective \'etale morphism
$U \to V \times_Y X$. We have to show that $U \to V$ is a
local complete intersection morphism of schemes.
By Topologies on Spaces, Lemma
\ref{spaces-topologies-lemma-recognize-fpqc-covering}
we have that $\{Y_i \times_Y V \to V\}$ is an fpqc covering
of schemes. By the case of schemes
(More on Morphisms, Lemma \ref{more-morphisms-lemma-descending-property-lci})
it suffices to prove the base change
$$
U \times_Y Y_i = U \times_V (V \times_Y Y_i) \longrightarrow V
$$
of $U \to V$ by $V \times_Y Y_i \to V$ is a
local complete intersection morphism. We can write this as the
composition
$$
U \times_Y Y_i \longrightarrow
(V \times_Y X) \times_Y Y_i = V \times_Y X_i \longrightarrow
V \times_Y Y_i
$$
The first arrow is an \'etale morphism of schemes (as a base change of
$U \to V \times_Y X$) and the second arrow is a
local complete intersection morphism of schemes as a flat base change of $f_i$.
The result follows as being a local complete intersection morphism
is syntomic local on the source and since \'etale morphisms
are syntomic (More on Morphisms, Lemma
\ref{more-morphisms-lemma-lci-syntomic-local-source}
and Morphisms, Lemma \ref{morphisms-lemma-etale-syntomic}).
\end{proof}

\begin{lemma}
\label{lemma-lci-syntomic-local-source}
The property $\mathcal{P}(f) =$``$f$ is a local complete intersection
morphism'' is syntomic local on the source.
\end{lemma}

\begin{proof}
This follows from
Descent on Spaces, Lemma \ref{spaces-descent-lemma-transfer-from-schemes} and
More on Morphisms, Lemma \ref{more-morphisms-lemma-lci-syntomic-local-source}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-lci-fibres}
Let $S$ be a scheme. Consider a commutative diagram
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & & Y \ar[ld]^q \\
& Z
}
$$
of algebraic spaces over $S$. Assume that both $p$ and $q$
are flat and locally of finite presentation.
Then there exists an open subspace $U(f) \subset X$
such that $|U(f)| \subset |X|$ is the set of points where $f$ is Koszul.
Moreover, for any morphism of algebraic spaces $Z' \to Z$, if
$f' : X' \to Y'$ is the base change of $f$ by $Z' \to Z$, then
$U(f')$ is the inverse image of $U(f)$ under the projection $X' \to X$.
\end{lemma}

\begin{proof}
This lemma is the analogue of
More on Morphisms, Lemma \ref{more-morphisms-lemma-base-change-lci-fibres}
and in fact we will deduce the lemma from it. By
Definition \ref{definition-lci}
the set $\{x \in |X| : f \text{ is Koszul at }x\}$ is
open in $|X|$ hence by
Properties of Spaces, Lemma \ref{spaces-properties-lemma-open-subspaces}
it corresponds to an open subspace $U(f)$ of $X$. Hence we only need to
prove the final statement.

\medskip\noindent
Choose a scheme $W$ and a surjective \'etale morphism $W \to Z$.
Choose a scheme $V$ and a surjective \'etale morphism $V \to W \times_Z Y$.
Choose a scheme $U$ and a surjective \'etale morphism $U \to V \times_Y X$.
Finally, choose a scheme $W'$ and a surjective \'etale morphism
$W' \to W \times_Z Z'$.
Set $V' = W' \times_W V$ and $U' = W' \times_W U$, so that we obtain
surjective \'etale morphisms $V' \to Y'$ and $U' \to X'$.
We will use without further mention an \'etale morphism of algebraic spaces
induces an open map of associated topological spaces (see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-etale-open}).
Note that by definition $U(f)$ is the image in $|X|$ of the set $T$
of points in $U$ where the morphism of schemes $U \to V$ is Koszul.
Similarly, $U(f')$ is the image in $|X'|$ of the set $T'$ of points in
$U'$ where the morphism of schemes $U' \to V'$ is Koszul. Now, by construction
the diagram
$$
\xymatrix{
U' \ar[r] \ar[d] & U \ar[d] \\
V' \ar[r] & V
}
$$
is cartesian (in the category of schemes). Hence the aforementioned
More on Morphisms, Lemma \ref{more-morphisms-lemma-base-change-lci-fibres}
applies to show that $T'$ is the inverse image of $T$. Since
$|U'| \to |X'|$ is surjective this implies the lemma.
\end{proof}

\begin{lemma}
\label{lemma-unramified-lci}
Let $S$ be a scheme. Let $f : X \to Y$ be a local complete intersection
morphism of algebraic spaces over $S$. Then $f$ is unramified if and only
if $f$ is formally unramified and in this case the conormal sheaf
$\mathcal{C}_{X/Y}$ is finite locally free on $X$.
\end{lemma}

\begin{proof}
This follows from the corresponding result for morphisms of schemes, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-unramified-lci},
by \'etale localization, see
Lemma \ref{lemma-universal-thickening-localize}.
(Note that in the situation of this lemma the morphism $V \to U$
is unramified and a local complete intersection morphism by definition.)
\end{proof}

\begin{lemma}
\label{lemma-transitivity-conormal-lci}
Let $S$ be a scheme. Let $Z \to Y \to X$ be formally unramified morphisms
of algebraic spaces over $S$. Assume that $Z \to Y$ is a local complete
intersection morphism. The exact sequence
$$
0 \to i^*\mathcal{C}_{Y/X} \to
\mathcal{C}_{Z/X} \to
\mathcal{C}_{Z/Y} \to 0
$$
of
Lemma \ref{lemma-transitivity-conormal}
is short exact.
\end{lemma}

\begin{proof}
Choose a scheme $U$ and a surjective \'etale morphism $U \to X$.
Choose a scheme $V$ and a surjective \'etale morphism $V \to U \times_X Y$.
Choose a scheme $W$ and a surjective \'etale morphism $W \to V \times_Y Z$.
By
Lemma \ref{lemma-universal-thickening-localize}
the morphisms $W \to V$ and $V \to U$ are formally unramified.
Moreover the sequence
$i^*\mathcal{C}_{Y/X} \to \mathcal{C}_{Z/X} \to \mathcal{C}_{Z/Y} \to 0$
restricts to the corresponding sequence
$i^*\mathcal{C}_{V/U} \to \mathcal{C}_{W/U} \to \mathcal{C}_{W/V} \to 0$
for $W \to V \to U$. Hence the result follows from the result for schemes
(More on Morphisms, Lemma \ref{more-morphisms-lemma-transitivity-conormal-lci})
as by definition the morphism $W \to V$ is a local complete intersection
morphism.
\end{proof}









\section{When is a morphism an isomorphism?}
\label{section-when-isomorphism}

\noindent
More generally we can ask:
``When does a morphism have property $\mathcal{P}$?''
A more precise question is the following. Suppose given a commutative diagram
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & & Y \ar[ld]^q \\
& Z
}
$$
of algebraic spaces. Does there exist a monomorphism of algebraic spaces
$W \to Z$ with the following two properties:
\begin{enumerate}
\item the base change $f_W : X_W \to Y_W$ has property $\mathcal{P}$, and
\item any morphism $Z' \to Z$ of algebraic spaces factors through $W$ if
and only if the base change $f_{Z'} : X_{Z'} \to Y_{Z'}$ has property
$\mathcal{P}$.
\end{enumerate}
In many cases, if $W \to Z$ exists, then it is an immersion, open immersion,
or closed immersion.

\medskip\noindent
The answer to this question may depend on auxiliary properties of the
morphisms $f$, $p$, and $q$. An example is $\mathcal{P}(f) =$``$f$ is flat''
which we have discussed for morphisms of schemes in the case $Y = S$ in
great detail in the chapter ``More on Flatness'', starting with
More on Flatness, Section \ref{flat-section-flattening-functors}.

\begin{lemma}
\label{lemma-where-unramified}
Consider a commutative diagram
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & & Y \ar[ld]^q \\
& Z
}
$$
of algebraic spaces. Assume that $p$ is locally of finite type and closed.
Then there exists an open subspace $W \subset Z$
such that a morphism $Z' \to Z$ factors through $W$ if and only if the
base change $f_{Z'} : X_{Z'} \to Y_{Z'}$ is unramified.
\end{lemma}

\begin{proof}
By
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-where-unramified}
there exists an open subspace $U(f) \subset X$ which is the set of
points where $f$ is unramified. Moreover, formation of $U(f)$ commutes
with arbitrary base change. Let $W \subset Z$ be the open subspace
(see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-open-subspaces})
with underlying set of points
$$
|W| = |Z| \setminus |p|\left(|X| \setminus |U(f)|\right)
$$
i.e., $z \in |Z|$ is a point of $W$ if and only if $f$ is unramified
at every point of $X$ above $z$. Note that this is open because we
assumed that $p$ is closed. Since the formation of $U(f)$
commutes with arbitrary base change we immediately see (using
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-factor-through-open-subspace})
that $W$ has the desired universal property.
\end{proof}

\begin{lemma}
\label{lemma-where-unramified-universally-injective}
Consider a commutative diagram
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & & Y \ar[ld]^q \\
& Z
}
$$
of algebraic spaces. Assume that
\begin{enumerate}
\item $p$ is locally of finite type,
\item $p$ is closed, and
\item $p_2 : X \times_Y X \to Z$ is closed.
\end{enumerate}
Then there exists an open subspace $W \subset Z$
such that a morphism $Z' \to Z$ factors through $W$ if and only if the
base change $f_{Z'} : X_{Z'} \to Y_{Z'}$ is unramified and universally
injective.
\end{lemma}

\begin{proof}
After replacing $Z$ by the open subspace found in
Lemma \ref{lemma-where-unramified}
we may assume that $f$ is already unramified; note that this does not
destroy assumption (2) or (3). By
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-diagonal-unramified-morphism}
we see that $\Delta_{X/Y} : X \to X \times_Y X$ is an open immersion.
This remains true after any base change. Hence by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-injective}
we see that $f_{Z'}$ is universally injective if and only if
the base change of the diagonal $X_{Z'} \to (X \times_Y X)_{Z'}$
is an isomorphism. Let $W \subset Z$ be the open subspace
(see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-open-subspaces})
with underlying set of points
$$
|W| = |Z| \setminus
|p_2|\left(|X \times_Y X| \setminus \Im(|\Delta_{X/Y}|)\right)
$$
i.e., $z \in |Z|$ is a point of $W$ if and only if the fibre of
$|X \times_Y X| \to |Z|$ over $z$ is in the image of
$|X| \to |X \times_Y X|$. Then it is clear from the discussion above
that the restriction $p^{-1}(W) \to q^{-1}(W)$ of $f$ is
unramified and universally injective.

\medskip\noindent
Conversely, suppose that $f_{Z'}$ is unramified and universally injective.
In order to show that $Z' \to Z$ factors through $W$ it suffices to show
that $|Z'| \to |Z|$ has image contained in $|W|$, see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-factor-through-open-subspace}.
Hence it suffices to prove the result when $Z'$ is the spectrum of a field.
Denote $z \in |Z|$ the image of $|Z'| \to |Z|$. The discussion above shows
that
$$
|X_{Z'}| \longrightarrow |(X \times_Y X)_{Z'}|
$$
is surjective. By
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-points-cartesian}
in the commutative diagram
$$
\xymatrix{
|X_{Z'}| \ar[d] \ar[r] &
|(X \times_Y X)_{Z'}| \ar[d] \\
|p|^{-1}(\{z\}) \ar[r] &
|p_2|^{-1}(\{z\})
}
$$
the vertical arrows are surjective. It follows that $z \in |W|$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-where-closed-immersion}
Consider a commutative diagram
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & & Y \ar[ld]^q \\
& Z
}
$$
of algebraic spaces. Assume that
\begin{enumerate}
\item $p$ is locally of finite type,
\item $p$ is universally closed, and
\item $q : Y \to Z$ is separated.
\end{enumerate}
Then there exists an open subspace $W \subset Z$
such that a morphism $Z' \to Z$ factors through $W$ if and only if the
base change $f_{Z'} : X_{Z'} \to Y_{Z'}$ is a closed immersion.
\end{lemma}

\begin{proof}
We will use the characterization of closed immersions as
universally closed, unramified, and universally injective morphisms, see
Lemma \ref{lemma-characterize-closed-immersion}.
First, note that since $p$ is universally closed and $q$ is
separated, we see that $f$ is universally closed, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-universally-closed-permanence}.
It follows that any base change of $f$ is universally closed, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-base-change-universally-closed}.
Thus to finish the proof of the lemma it suffices to prove that
the assumptions of
Lemma \ref{lemma-where-unramified-universally-injective}
are satisfied. The projection $\text{pr}_0 : X \times_Y X \to X$
is universally closed as a base change of $f$, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-base-change-universally-closed}.
Hence $X \times_Y X \to Z$ is universally closed as
a composition of universally closed morphisms (see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-composition-universally-closed}).
This finishes the proof of the lemma.
\end{proof}

\begin{lemma}
\label{lemma-where-flat}
Consider a commutative diagram
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & & Y \ar[ld]^q \\
& Z
}
$$
of algebraic spaces. Assume that
\begin{enumerate}
\item $p$ is locally of finite presentation,
\item $p$ is flat,
\item $p$ is closed, and
\item $q$ is locally of finite type.
\end{enumerate}
Then there exists an open subspace $W \subset Z$
such that a morphism $Z' \to Z$ factors through $W$ if and only if the
base change $f_{Z'} : X_{Z'} \to Y_{Z'}$ is flat.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-base-change-flatness-fibres}
the set
$$
A = \{x \in |X| : X\text{ flat at }x \text{ over }Y\}.
$$
is open in $|X|$ and its formation commutes with arbitrary base
change. Let $W \subset Z$ be the open subspace
(see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-open-subspaces})
with underlying set of points
$$
|W| = |Z| \setminus |p|\left(|X| \setminus A\right)
$$
i.e., $z \in |Z|$ is a point of $W$ if and only if the whole fibre
of $|X| \to |Z|$ over $z$ is contained in $A$. This is open because
$p$ is closed. Since the formation of $A$ commutes with arbitrary
base change it follows that $W$ works.
\end{proof}

\begin{lemma}
\label{lemma-where-surjective-flat}
Consider a commutative diagram
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & & Y \ar[ld]^q \\
& Z
}
$$
of algebraic spaces. Assume that
\begin{enumerate}
\item $p$ is locally of finite presentation,
\item $p$ is flat,
\item $p$ is closed,
\item $q$ is locally of finite type, and
\item $q$ is closed.
\end{enumerate}
Then there exists an open subspace $W \subset Z$
such that a morphism $Z' \to Z$ factors through $W$ if and only if the
base change $f_{Z'} : X_{Z'} \to Y_{Z'}$ is surjective and flat.
\end{lemma}

\begin{proof}
By
Lemma \ref{lemma-where-flat}
we may assume that $f$ is flat.
Note that $f$ is locally of finite presentation by
Morphisms of Spaces,
Lemma \ref{spaces-morphisms-lemma-finite-presentation-permanence}.
Hence $f$ is open, see
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-fppf-open}.
Let $W \subset Z$ be the open subspace (see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-open-subspaces})
with underlying set of points
$$
|W| = |Z| \setminus |q|\left(|Y| \setminus |f|(|X|)\right).
$$
in other words for $z \in |Z|$ we have $z \in |W|$ if and only
if the whole fibre of $|Y| \to |Z|$ over $z$ is in the image of
$|X| \to |Y|$. Since $q$ is closed this set is open in $|Z|$.
The morphism $X_W \to Y_W$ is surjective by construction.
Finally, suppose that $X_{Z'} \to Y_{Z'}$ is surjective.
In order to show that $Z' \to Z$ factors through $W$ it suffices to show
that $|Z'| \to |Z|$ has image contained in $|W|$, see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-factor-through-open-subspace}.
Hence it suffices to prove the result when $Z'$ is the spectrum of a field.
Denote $z \in |Z|$ the image of $|Z'| \to |Z|$. By
Properties of Spaces,
Lemma \ref{spaces-properties-lemma-points-cartesian}
in the commutative diagram
$$
\xymatrix{
|X_{Z'}| \ar[d] \ar[r] &
|Y_{Z'}| \ar[d] \\
|p|^{-1}(\{z\}) \ar[r] &
|q|^{-1}(\{z\})
}
$$
the vertical arrows are surjective. It follows that $z \in |W|$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-where-isomorphism}
Consider a commutative diagram
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & & Y \ar[ld]^q \\
& Z
}
$$
of algebraic spaces. Assume that
\begin{enumerate}
\item $p$ is locally of finite presentation,
\item $p$ is flat,
\item $p$ is universally closed,
\item $q$ is locally of finite type,
\item $q$ is closed, and
\item $q$ is separated.
\end{enumerate}
Then there exists an open subspace $W \subset Z$
such that a morphism $Z' \to Z$ factors through $W$ if and only if the
base change $f_{Z'} : X_{Z'} \to Y_{Z'}$ is an isomorphism.
\end{lemma}

\begin{proof}
By
Lemma \ref{lemma-where-surjective-flat}
there exists an open subspace $W_1 \subset Z$ such that
$f_{Z'}$ is surjective and flat if and only if $Z' \to Z$
factors through $W_1$. By
Lemma \ref{lemma-where-closed-immersion}
there exists an open subspace $W_2 \subset Z$ such that
$f_{Z'}$ is a closed immersion if and only if $Z' \to Z$
factors through $W_2$. We claim that $W = W_1 \cap W_2$ works.
Certainly, if $f_{Z'}$ is an isomorphism, then $Z' \to Z$
factors through $W$. Hence it suffices to show that
$f_W$ is an isomorphism. By construction $f_W$ is a
surjective flat closed immersion. In particular $f_W$ is
representable. Since a surjective flat closed immersion of
schemes is an isomorphism (see
Morphisms, Lemma \ref{morphisms-lemma-characterize-flat-closed-immersions})
we win. (Note that actually $f_W$ is locally of finite presentation,
whence open, so you can avoid the use of this lemma if you like.)
\end{proof}

\begin{lemma}
\label{lemma-where-lci}
Consider a commutative diagram
$$
\xymatrix{
X \ar[rr]_f \ar[rd]_p & & Y \ar[ld]^q \\
& Z
}
$$
of algebraic spaces. Assume that
\begin{enumerate}
\item $p$ is flat and locally of finite presentation,
\item $p$ is closed, and
\item $q$ is flat and locally of finite presentation,
\end{enumerate}
Then there exists an open subspace $W \subset Z$
such that a morphism $Z' \to Z$ factors through $W$ if and only if the
base change $f_{Z'} : X_{Z'} \to Y_{Z'}$ is a local complete intersection
morphism.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-base-change-lci-fibres}
there exists an open subspace $U(f) \subset X$ which is the set of
points where $f$ is Koszul. Moreover, formation of $U(f)$ commutes
with arbitrary base change. Let $W \subset Z$ be the open subspace
(see
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-open-subspaces})
with underlying set of points
$$
|W| = |Z| \setminus |p|\left(|X| \setminus |U(f)|\right)
$$
i.e., $z \in |Z|$ is a point of $W$ if and only if $f$ is Koszul
at every point of $X$ above $z$. Note that this is open because we
assumed that $p$ is closed. Since the formation of $U(f)$
commutes with arbitrary base change we immediately see (using
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-factor-through-open-subspace})
that $W$ has the desired universal property.
\end{proof}








\section{Exact sequences of differentials and conormal sheaves}
\label{section-exact}

\noindent
In this section we collect some results on exact sequences of conormal
sheaves and sheaves of differentials. In some sense these are all
realizations of the triangle of cotangent complexes associated to
composable morphisms of algebraic spaces.

\medskip\noindent
In the sequences below each of the maps
are as constructed in either
Lemma \ref{lemma-functoriality-differentials} or
Lemma \ref{lemma-universal-thickening-functorial}.
Let $S$ be a scheme. Let $g : Z \to Y$ and $f : Y \to X$ be morphisms of
algebraic spaces over $S$.
\begin{enumerate}
\item There is a canonical exact sequence
$$
g^*\Omega_{Y/X} \to \Omega_{Z/X} \to \Omega_{Z/Y} \to 0,
$$
see
Lemma \ref{lemma-triangle-differentials}.
If $g : Z \to Y$ is formally smooth, then this sequence is a short
exact sequence, see
Lemma \ref{lemma-triangle-differentials-formally-smooth}.
\item If $g$ is formally unramified, then there is a canonical exact sequence
$$
\mathcal{C}_{Z/Y} \to g^*\Omega_{Y/X} \to \Omega_{Z/X} \to 0,
$$
see
Lemma \ref{lemma-universally-unramified-differentials-sequence}.
If $f \circ g : Z \to X$ is formally smooth, then this sequence is a short
exact sequence, see
Lemma \ref{lemma-differentials-formally-unramified-formally-smooth}.
\item if $g$ and $f \circ g$ are formally unramified, then there is a
canonical exact sequence
$$
\mathcal{C}_{Z/X} \to \mathcal{C}_{Z/Y} \to g^*\Omega_{Y/X} \to 0,
$$
see
Lemma \ref{lemma-two-unramified-morphisms}.
If $f : Y \to X$ is formally smooth, then this sequence is a short
exact sequence, see
Lemma \ref{lemma-two-unramified-morphisms-formally-smooth}.
\item if $g$ and $f$ are formally unramified, then there is a canonical
exact sequence
$$
g^*\mathcal{C}_{Y/X} \to \mathcal{C}_{Z/X} \to \mathcal{C}_{Z/Y} \to 0.
$$
see
Lemma \ref{lemma-transitivity-conormal-unramified}.
If $g : Z \to Y$ is a local complete intersection morphism,
then this sequence is a short exact sequence, see
Lemma \ref{lemma-transitivity-conormal-lci}.
\end{enumerate}










\section{Characterizing pseudo-coherent complexes, II}
\label{section-characterize-pseudo-coherent}

\noindent
In this section we discuss a characterization of pseudo-coherent complexes
in terms of cohomology. Earlier material on pseudo-coherent complexes
on algebraic spaces may be found in
Derived Categories of Spaces, Section
\ref{spaces-perfect-section-spell-out}
and in
Derived Categories of Spaces, Section
\ref{spaces-perfect-section-pseudo-coherent-hocolim}.
The analogue of this section for schemes is More on Morphisms, Section
\ref{more-morphisms-section-characterize-pseudo-coherent}.
A basic tool will be to reduce to the case of projective space
using a derived version of Chow's lemma, see
Lemma \ref{lemma-derived-chow}.

\begin{lemma}
\label{lemma-case-of-tor-independence}
Let $S$ be a scheme. Consider a commutative diagram of algebraic spaces
$$
\xymatrix{
Z' \ar[d] \ar[r] & Y' \ar[d] \\
X' \ar[r] & B'
}
$$
over $S$.
Let $B \to B'$ be a morphism. Denote by $X$ and $Y$ the base
changes of $X'$ and $Y'$ to $B$.
Assume $Y' \to B'$ and $Z' \to X'$ are flat.
Then $X \times_B Y$ and $Z'$ are Tor independent over $X' \times_{B'} Y'$.
\end{lemma}

\begin{proof}
By Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-tor-independent}
we may check tor independence \'etale locally on $X \times_B Y$
and $Z'$. This\footnote{Here is the argument in more detail.
Choose a surjective \'etale morphism $W' \to B'$
with $W'$ a scheme. Choose a surjective \'etale morphism
$W \to B \times_{B'} W'$ with $W$ a scheme. Choose a
surjective \'etale morphism
$U' \to X' \times_{B'} W'$ with $U'$ a scheme. Choose a
surjective \'etale morphism $V' \to Y' \times_{B'} W'$ with $V'$ a scheme.
Observe that $U' \times_{W'} V' \to X' \times_{B'} Y'$ is surjective
\'etale. Choose a surjective \'etale morphism
$T' \to Z' \times_{X' \times_{B'} Y'} U' \times_{W'} V'$
with $T'$ a scheme. Denote $U$ and $V$ the base changes of $U'$ and $V'$
to $W$. Then the lemma says that $X \times_B Y$ and $Z'$
are Tor independent over $X' \times_{B'} Y'$ as algebraic spaces
if and only if $U \times_W V$ and $T'$ are Tor independent over
$U' \times_{W'} V'$ as schemes. Thus
it suffices to prove the lemma for
the square with corners $T', U', V', W'$ and base change by $W \to W'$.
The flatness of $Y' \to B'$ and $Z' \to X'$ implies flatness
of $V' \to W'$ and $T' \to U'$.}
reduces the lemma to the case of schemes
which is More on Morphisms, Lemma
\ref{more-morphisms-lemma-case-of-tor-independence}.
\end{proof}

\begin{lemma}[Derived Chow's lemma]
\label{lemma-derived-chow}
Let $A$ be a ring. Let $X$ be a separated algebraic space
of finite presentation over $A$. Let $x \in |X|$. Then there exist
an $n \geq 0$,
a closed subspace $Z \subset X \times_A \mathbf{P}^n_A$,
a point $z \in |Z|$,
an open $V \subset \mathbf{P}^n_A$, and
an object $E$ in $D(\mathcal{O}_{X \times_A \mathbf{P}^n_A})$ such that
\begin{enumerate}
\item $Z \to X \times_A \mathbf{P}^n_A$ is of finite presentation,
\item $c : Z \to \mathbf{P}^n_A$ is a closed immersion over $V$,
set $W = c^{-1}(V)$,
\item the restriction of $b : Z \to X$ to $W$ is \'etale,
$z \in W$, and $b(z) = x$,
\item $E|_{X \times_A V} \cong
(b, c)_*\mathcal{O}_Z|_{X \times_A V}$,
\item $E$ is pseudo-coherent and supported on $Z$.
\end{enumerate}
\end{lemma}

\begin{proof}
We can find a finite type $\mathbf{Z}$-subalgebra $A' \subset A$
and an algebraic space $X'$ separated and of finite presentation over $A'$
whose base change to $A$ is $X$. See
Limits of Spaces, Lemmas
\ref{spaces-limits-lemma-descend-finite-presentation} and
\ref{spaces-limits-lemma-descend-separated-morphism}.
Let $x' \in |X'|$ be the image of $x$.
If we can prove the lemma for $(X'/A', x')$, then
the lemma follows for $(X/A, x)$.
Namely, if $n', Z', z', V', E'$ provide the solution
for $(X'/A', x')$, then we can let
$n = n'$,
let $Z \subset X \times \mathbf{P}^n$ be the inverse image of $Z'$,
let $z \in Z$ be the unique point mapping to $x$,
let $V \subset \mathbf{P}^n_A$ be the inverse image of $V'$, and
let $E$ be the derived pullback of $E'$.
Observe that $E$ is pseudo-coherent by
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-pseudo-coherent-pullback}.
It only remains to check (5). To see this
set $W = c^{-1}(V)$ and $W' = (c')^{-1}(V')$
and consider the cartesian square
$$
\xymatrix{
W \ar[d]_{(b, c)} \ar[r] & W' \ar[d]^{(b', c')} \\
X \times_A V \ar[r] & X' \times_{A'} V'
}
$$
By Lemma \ref{lemma-case-of-tor-independence} $X \times_A V$ and $W'$
are tor-independent over $X' \times_{A'} V'$.
Thus the derived pullback of
$(b', c')_*\mathcal{O}_{W'}$ to $X \times_A V$
is $(b, c)_*\mathcal{O}_W$ by
Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-compare-base-change}.
This also uses that $R(b', c')_*\mathcal{O}_{Z'} = (b', c')_*\mathcal{O}_{Z'}$
because $(b', c')$ is a closed immersion and similarly for
$(b, c)_*\mathcal{O}_Z$.
Since $E'|_{U' \times_{A'} V'} =
(b', c')_*\mathcal{O}_{W'}$ we obtain
$E|_{U \times_A V} = (b, c)_*\mathcal{O}_W$
and (5) holds.
This reduces us to the situation described in the next
paragraph.

\medskip\noindent
Assume $A$ is of finite type over $\mathbf{Z}$.
Choose an \'etale morphism $U \to X$ where $U$ is an affine scheme
and a point $u \in U$ mapping to $x$. Then $U$ is of finite type over $A$.
Choose a closed immersion $U \to \mathbf{A}^n_A$ and denote
$j : U \to \mathbf{P}^n_A$ the immersion we get by composing
with the open immersion $\mathbf{A}^n_A \to \mathbf{P}^n_A$.
Let $Z$ be the scheme theoretic closure of
$$
(\text{id}_U, j) : U \longrightarrow X \times_A \mathbf{P}^n_A
$$
Let $z \in Z$ be the image of $u$.
Let $Y \subset \mathbf{P}^n_A$ be the scheme theoretic
closure of $j$. Then it is clear that $Z \subset X \times_A Y$
is the scheme theoretic closure of
$(\text{id}_U, j) : U \to X \times_A Y$.
As $X$ is separated, the morphism
$X \times_A Y \to Y$ is separated as well.
Hence we see that $Z \to Y$ is an isomorphism over
the open subscheme $j(U) \subset Y$ by
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-scheme-theoretic-image-of-partial-section}.
Choose $V \subset \mathbf{P}^n_A$ open with $V \cap Y = j(U)$.
Then we see that (2) holds, that $W = (\text{id}_U, j)(U)$, and hence
that (3) holds. Part (1) holds because $A$ is Noetherian.

\medskip\noindent
Because $A$ is Noetherian we see that $X$ and $X \times_A \mathbf{P}^n_A$
are Noetherian algebraic spaces. Hence we can take $E = (b, c)_*\mathcal{O}_Z$
in this case: (4) is clear and for (5) see
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-identify-pseudo-coherent-noetherian}.
This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-compute-Fourier-Mukai-for-derived-chow}
Let $X/A$, $x \in |X|$, and
$n, Z, z, V, E$ be as in Lemma \ref{lemma-derived-chow}.
For any $K \in D_\QCoh(\mathcal{O}_X)$ we have
$$
Rq_*(Lp^*K \otimes^\mathbf{L} E)|_V = R(W \to V)_*K|_W
$$
where $p : X \times_A \mathbf{P}^n_A \to X$ and
$q : X \times_A \mathbf{P}^n_A \to \mathbf{P}^n_A$ are
the projections and where the morphism $W \to V$ is
the finitely presented closed immersion $c|_W : W \to V$.
\end{lemma}

\begin{proof}
Since $W = c^{-1}(V)$ and since $c$ is a closed immersion
over $V$, we see that $c|_W$ is a closed immersion.
It is of finite presentation because $W$ and $V$ are of finite
presentation over $A$, see
Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-finite-presentation-permanence}.
First we have
$$
Rq_*(Lp^*K \otimes^\mathbf{L} E)|_V =
Rq'_*\left((Lp^*K \otimes^\mathbf{L} E)|_{X \times_A V}\right)
$$
where $q' : X \times_A V \to V$ is the projection because
formation of total direct image commutes with localization.
Denote $i = (b, c)|_W : W \to X \times_A V$ the given closed immersion.
Then
$$
Rq'_*\left((Lp^*K \otimes^\mathbf{L} E)|_{X \times_A V}\right) =
Rq'_*(Lp^*K|_{X \times_A V} \otimes^\mathbf{L} i_*\mathcal{O}_W)
$$
by property (5). Since $i$ is a closed immersion we have
$i_*\mathcal{O}_W = Ri_*\mathcal{O}_W$.
Using
Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-cohomology-base-change}
we can rewrite this as
$$
Rq'_* Ri_* Li^* Lp^*K|_{X \times_A V} =
R(q' \circ i)_* Lb^*K|_W =
R(W \to V)_* K|_W
$$
which is what we want. (Note that restricting to $W$
and derived pulling back via $W \to X$ is the same thing
as $W$ is \'etale over $X$.)
\end{proof}

\begin{lemma}
\label{lemma-characterize-pseudo-coherent}
Let $A$ be a ring. Let $X$ be an algebraic space separated and
of finite presentation over $A$. Let $K \in D_\QCoh(\mathcal{O}_X)$.
If $R\Gamma(X, E \otimes^\mathbf{L} K)$ is pseudo-coherent
in $D(A)$ for every pseudo-coherent $E$ in $D(\mathcal{O}_X)$,
then $K$ is pseudo-coherent relative to $A$
(Definition \ref{definition-relative-pseudo-coherence}).
\end{lemma}

\begin{proof}
Assume $K \in D_\QCoh(\mathcal{O}_X)$ and
$R\Gamma(X, E \otimes^\mathbf{L} K)$ is pseudo-coherent
in $D(A)$ for every pseudo-coherent $E$ in $D(\mathcal{O}_X)$.
Let $x \in |X|$. We will show that $K$ is pseudo-coherent relative to $A$
in an \'etale neighbourhood of $x$. This will prove the lemma
by our definition of relative pseudo-coherence.

\medskip\noindent
Choose $n, Z, z, V, E$ as in Lemma \ref{lemma-derived-chow}.
Denote $p : X \times \mathbf{P}^n \to X$ and
$q : X \times \mathbf{P}^n \to \mathbf{P}^n_A$
the projections.
Then for any $i \in \mathbf{Z}$ we have
\begin{align*}
& R\Gamma(\mathbf{P}^n_A,
Rq_*(Lp^*K \otimes^\mathbf{L} E)
\otimes^\mathbf{L}
\mathcal{O}_{\mathbf{P}^n_A}(i)) \\
& =
R\Gamma(X \times \mathbf{P}^n,
Lp^*K \otimes^\mathbf{L} E \otimes^\mathbf{L}
Lq^*\mathcal{O}_{\mathbf{P}^n_A}(i)) \\
& =
R\Gamma(X,
K \otimes^\mathbf{L} Rq_*(E \otimes^\mathbf{L}
Lq^*\mathcal{O}_{\mathbf{P}^n_A}(i)))
\end{align*}
by
Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-cohomology-base-change}.
By
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-flat-proper-pseudo-coherent-direct-image-general}
the complex $Rq_*(E \otimes^\mathbf{L} Lq^*\mathcal{O}_{\mathbf{P}^n_A}(i))$
is pseudo-coherent on $X$. Hence the assumption tells us the expression
in the displayed formula is a pseudo-coherent object of $D(A)$.
By
Derived Categories of Schemes,
Lemma \ref{perfect-lemma-pseudo-coherent-on-projective-space}
we conclude that $Rq_*(Lp^*K \otimes^\mathbf{L} E)$ is
pseudo-coherent on $\mathbf{P}^n_A$.
By Lemma \ref{lemma-compute-Fourier-Mukai-for-derived-chow}
we have
$$
Rq_*(Lp^*K \otimes^\mathbf{L} E)|_{X \times_A V} =
R(W \to V)_*K|_W
$$
Since $W \to V$ is a closed immersion into an open subscheme of
$\mathbf{P}^n_A$ this means $K|_W$ is pseudo-coherent relative to $A$
for example by
More on Morphisms,
Lemma \ref{more-morphisms-lemma-check-relative-pseudo-coherence-on-charts}.
\end{proof}

\begin{lemma}
\label{lemma-characterize-pseudo-coh-improved}
Let $A$ be a ring. Let $X$ be an algebraic space separated and
of finite presentation over $A$. Let $K \in D_\QCoh(\mathcal{O}_X)$. If 
$R \Gamma (X, E \otimes ^{\mathbf{L}} K)$ is
pseudo-coherent in $D(A)$ for every perfect 
$E \in D(\mathcal{O}_X)$, then $K$ is pseudo-coherent
relative to $A$.
\end{lemma}

\begin{proof}
In view of Lemma \ref{lemma-characterize-pseudo-coherent}, it suffices
to show $R \Gamma (X, E \otimes ^{\mathbf{L}} K)$ is
pseudo-coherent in $D(A)$ for every pseudo-coherent 
$E \in D(\mathcal{O}_X)$. By Derived Categories of Spaces,
Proposition \ref{spaces-perfect-proposition-detecting-bounded-above}
it follows that $K \in D^-_\QCoh (\mathcal{O}_X)$. Now the
result follows by Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-perfect-enough}.
\end{proof}












\section{Relatively perfect objects}
\label{section-relatively-perfect}

\noindent
In this section we introduce a notion from \cite{lieblich-complexes}.
This notion has been discussed for morphisms of schemes in
Derived Categories of Schemes, Section
\ref{perfect-section-relatively-perfect}.

\begin{definition}
\label{definition-relatively-perfect}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$ which is flat and locally of finite presentation.
An object $E$ of $D(\mathcal{O}_X)$ is {\it perfect relative to $Y$} or
{\it $Y$-perfect} if $E$ is pseudo-coherent
(Cohomology on Sites, Definition
\ref{sites-cohomology-definition-pseudo-coherent}) and
$E$ locally has finite tor dimension as an object of
$D(f^{-1}\mathcal{O}_Y)$
(Cohomology on Sites, Definition
\ref{sites-cohomology-definition-tor-amplitude}).
\end{definition}

\noindent
Please see Derived Categories of Schemes,
Remark \ref{perfect-remark-discuss-rel-perfect} for a discussion;
here we just mention that $E$ being pseudo-coherent is the
same thing as $E$ being pseudo-coherent relative to $Y$ by
Lemma \ref{lemma-relative-pseudo-coherent-is-moot}.
Moreover, pseudo-coherence of $E$ implies $E \in D_\QCoh(\mathcal{O}_X)$, see
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-pseudo-coherent}.

\begin{example}
\label{example-relatively-perfect-field}
Let $k$ be a field. Let $X$ be an algebraic space of finite presentation
over $k$ (in particular $X$ is quasi-compact). Then an object $E$ of
$D(\mathcal{O}_X)$ is $k$-perfect if and only if it is bounded and
pseudo-coherent (by definition), i.e., if and only if it is in
$D^b_{\textit{Coh}}(X)$ (by
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-identify-pseudo-coherent-noetherian}).
Thus being relatively perfect does {\bf not} mean ``perfect on the fibres''.
\end{example}

\noindent
The corresponding algebra concept is studied in
More on Algebra, Section \ref{more-algebra-section-relatively-perfect}.
We can link the notion for algebraic spaces with the
algebraic notion as follows.

\begin{lemma}
\label{lemma-affine-locally-rel-perfect}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of algebraic spaces
over $S$ which is flat and locally of finite presentation.
Let $E \in D_\QCoh(\mathcal{O}_X)$. The following are equivalent:
\begin{enumerate}
\item $E$ is $Y$-perfect,
\item for every commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r]_g & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$, $V$ are schemes and the vertical arrows are \'etale, the complex
$E|_U$ is $V$-perfect in the sense of Derived Categories of Schemes,
Definition \ref{perfect-definition-relatively-perfect},
\item for some commutative diagram as in (2) with $U \to X$
surjective, the complex $E|_U$ is $V$-perfect in the sense of
Derived Categories of Schemes,
Definition \ref{perfect-definition-relatively-perfect},
\item for every commutative diagram as in (2) with $U$ and $V$
affine the complex $R\Gamma(U, E)$ is $\mathcal{O}_Y(V)$-perfect.
\end{enumerate}
\end{lemma}

\begin{proof}
To make sense of parts (2), (3), (4) of the lemma, observe that
the object $E|_U$ of $D_\QCoh(\mathcal{O}_U)$ corresponds to
an object $E_0$ of $D_\QCoh(\mathcal{O}_{U_0})$ where $U_0$
denotes the scheme underlying $U$, see Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site}.
Moreover, in this case $E_0$ is pseudo-coherent if and only if
$E|_U$ is pseudo-coherent, see Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-descend-pseudo-coherent}.
Also, $E|_U$ locally has finite tor dimension over
$f^{-1}\mathcal{O}_Y|_U = g^{-1}\mathcal{O}_V$ if and only if
$E_0$ locally has finite tor dimension over $g_0^{-1}\mathcal{O}_{V_0}$
by Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-tor-dimension-rel}.
Here $g_0 : U_0 \to V_0$ is the morphism of schemes representing
$g : U \to V$ (notation as in Derived Categories of Spaces,
Remark \ref{spaces-perfect-remark-match-total-direct-images}).
Finally, observe that ``being pseudo-coherent'' is \'etale local and
of course ``having locally finite tor dimension'' is \'etale local.
Thus we see that it suffices to check $Y$-perfectness \'etale locally
and by the above discussion we see that (1) implies (2) and
(3) implies (1). Since part (4) is equivalent
to (2) and (3) by
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-affine-locally-rel-perfect}
the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-triangulated}
Let $S$ be a scheme. Let $f : X \to Y$ be a morphism of
algebraic spaces over $S$ which is flat and locally of finite presentation.
The full subcategory of $D(\mathcal{O}_X)$ consisting of $Y$-perfect objects is
a saturated\footnote{Derived Categories, Definition
\ref{derived-definition-saturated}.} triangulated subcategory.
\end{lemma}

\begin{proof}
This follows from Cohomology on Sites, Lemmas
\ref{sites-cohomology-lemma-cone-pseudo-coherent},
\ref{sites-cohomology-lemma-summands-pseudo-coherent},
\ref{sites-cohomology-lemma-cone-tor-amplitude}, and
\ref{sites-cohomology-lemma-summands-tor-amplitude}.
\end{proof}

\begin{lemma}
\label{lemma-perfect-relatively-perfect}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is flat and locally of finite presentation.
A perfect object of $D(\mathcal{O}_X)$ is $Y$-perfect.
If $K, M \in D(\mathcal{O}_X)$, then $K \otimes_{\mathcal{O}_X}^\mathbf{L} M$
is $Y$-perfect if $K$ is perfect and $M$ is $Y$-perfect.
\end{lemma}

\begin{proof}
Reduce to the case of schemes using
Lemma \ref{lemma-affine-locally-rel-perfect}
and then apply
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-perfect-relatively-perfect}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-relatively-perfect}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is flat and locally of finite presentation.
Let $g : Y' \to Y$ be a morphism of algebraic spaces over $S$.
Set $X' = Y' \times_Y X$ and denote $g' : X' \to X$ the projection.
If $K \in D(\mathcal{O}_X)$ is $Y$-perfect, then $L(g')^*K$
is $Y'$-perfect.
\end{lemma}

\begin{proof}
Reduce to the case of schemes using
Lemma \ref{lemma-affine-locally-rel-perfect}
and then apply
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-base-change-relatively-perfect}.
\end{proof}

\begin{situation}
\label{situation-relative-descent}
Let $S$ be a scheme.
Let $Y = \lim_{i \in I} Y_i$ be a limit of a directed system of
algebraic spaces over $S$
with affine transition morphisms $g_{i'i} : Y_{i'} \to Y_i$.
We assume that $Y_i$ is quasi-compact and quasi-separated for all $i \in I$.
We denote $g_i : Y \to Y_i$ the projection. We fix an element $0 \in I$
and a flat morphism of finite presentation $X_0 \to Y_0$.
We set $X_i = Y_i \times_{Y_0} X_0$ and $X = Y \times_{Y_0} X_0$
and we denote the transition morphisms $f_{i'i} : X_{i'} \to X_i$
and $f_i : X \to X_i$ the projections.
\end{situation}

\begin{lemma}
\label{lemma-relative-descend-homomorphisms}
In Situation \ref{situation-relative-descent}.
Let $K_0$ and $L_0$ be objects of $D(\mathcal{O}_{X_0})$.
Set $K_i = Lf_{i0}^*K_0$ and $L_i = Lf_{i0}^*L_0$ for $i \geq 0$
and set $K = Lf_0^*K_0$ and $L = Lf_0^*L_0$. Then the map
$$
\colim_{i \geq 0} \Hom_{D(\mathcal{O}_{X_i})}(K_i, L_i)
\longrightarrow
\Hom_{D(\mathcal{O}_X)}(K, L)
$$
is an isomorphism if $K_0$ is pseudo-coherent and
$L_0 \in D_\QCoh(\mathcal{O}_{X_0})$ has (locally)
finite tor dimension as an object of
$D((X_0 \to Y_0)^{-1}\mathcal{O}_{Y_0})$
\end{lemma}

\begin{proof}
For every quasi-compact and quasi-separated object $U_0$ of
$(X_0)_{spaces, \etale}$ consider the condition $P$ that
$$
\colim_{i \geq 0} \Hom_{D(\mathcal{O}_{U_i})}(K_i|_{U_i}, L_i|_{U_i})
\longrightarrow
\Hom_{D(\mathcal{O}_U)}(K|_U, L|_U)
$$
is an isomorphism where $U = X \times_{X_0} U_0$ and
$U_i = X_i \times_{X_0} U_0$. We will prove $P$ holds for each $U_0$.

\medskip\noindent
Suppose that $(U_0 \subset W_0, V_0 \to W_0)$ is an elementary
distinguished square in $(X_0)_{spaces, \etale}$
and $P$ holds for $U_0, V_0, U_0 \times_{W_0} V_0$.
Then $P$ holds for $W_0$ by Mayer-Vietoris
for hom in the derived category, see Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-mayer-vietoris-hom}.

\medskip\noindent
We first consider $U_0 = W_0 \times_{Y_0} X_0$ with $W_0$ a
quasi-compact and quasi-separated object of $(Y_0)_{spaces, \etale}$.
By the induction principle of Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-induction-principle}
applied to these $W_0$ and the previous paragraph,
we find that it is enough to prove
$P$ for $U_0 = W_0 \times_{Y_0} X_0$ with $W_0$ affine.
In other words, we have reduced to the case where $Y_0$ is affine.
Next, we apply the induction principle again, this time to all
quasi-compact and quasi-separated opens of $X_0$, to reduce to the
case where $X_0$ is affine as well.

\medskip\noindent
If $X_0$ and $Y_0$ are affine, then we are back in the case
of schemes which is proved in
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-relative-descend-homomorphisms}.
The reader may use
Derived Categories of Spaces, Lemmas
\ref{spaces-perfect-lemma-pseudo-coherent},
\ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site},
\ref{spaces-perfect-lemma-descend-pseudo-coherent}, and
\ref{spaces-perfect-lemma-tor-dimension-rel}
to accomplish the translation of the statement into a statement
involving only schemes and derived categories of modules on schemes.
\end{proof}

\begin{lemma}
\label{lemma-descend-relatively-perfect}
In Situation \ref{situation-relative-descent} the category of
$Y$-perfect objects of $D(\mathcal{O}_X)$ is the colimit of the categories
of $Y_i$-perfect objects of $D(\mathcal{O}_{X_i})$.
\end{lemma}

\begin{proof}
For every quasi-compact and quasi-separated object $U_0$ of
$(X_0)_{spaces, \etale}$ consider the condition $P$
that the functor
$$
\colim_{i \geq 0} D_{Y_i\text{-perfect}}(\mathcal{O}_{U_i})
\longrightarrow
D_{Y\text{-perfect}}(\mathcal{O}_U)
$$
is an equivalence where $U = X \times_{X_0} U_0$ and
$U_i = X_i \times_{X_0} U_0$.
We observe that we already know this functor is fully faithful
by Lemma \ref{lemma-relative-descend-homomorphisms}. Thus it suffices to prove
essential surjectivity.

\medskip\noindent
Suppose that $(U_0 \subset W_0, V_0 \to W_0)$ is an elementary
distinguished square in $(X_0)_{spaces, \etale}$
and $P$ holds for $U_0, V_0, U_0 \times_{W_0} V_0$.
We claim that $P$ holds for $W_0$. We will use the notation
$U_i = X_i \times_{X_0} U_0$, $U = X \times_{X_0} U_0$,
and similarly for $V_0$ and $W_0$. We will abusively use the symbol
$f_i$ for all the morphisms $U \to U_i$, $V \to V_i$,
$U \times_W V \to U_i \times_{W_i} V_i$, and $W \to W_i$.
Suppose $E$ is an $Y$-perfect object of $D(\mathcal{O}_W)$.
Goal: show $E$ is in the essential image of the functor.
By assumption,
we can find $i \geq 0$, an $Y_i$-perfect object $E_{U, i}$ on $U_i$,
an $Y_i$-perfect object $E_{V, i}$ on $V_i$, and
isomorphisms $Lf_i^*E_{U, i} \to E|_U$ and $Lf_i^*E_{V, i} \to E|_V$.
Let
$$
a : E_{U, i} \to (Rf_{i, *}E)|_{U_i}
\quad\text{and}\quad
b : E_{V, i} \to (Rf_{i, *}E)|_{V_i}
$$
the maps adjoint to the isomorphisms $Lf_i^*E_{U, i} \to E|_U$
and $Lf_i^*E_{V, i} \to E|_V$.
By fully faithfulness, after increasing $i$,
we can find an isomorphism
$c : E_{U, i}|_{U_i \times_{W_i} V_i} \to E_{V, i}|_{U_i \times_{W_i} V_i}$
which pulls back to the identifications 
$$
Lf_i^*E_{U, i}|_{U \times_W V} \to E|_{U \times_W V} \to
Lf_i^*E_{V, i}|_{U \times_W V}.
$$
Apply Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-glue}
to get an object $E_i$ on $W_i$ and a map $d : E_i \to Rf_{i, *}E$
which restricts to the maps $a$ and $b$ over $U_i$ and $V_i$.
Then it is clear that $E_i$ is $Y_i$-perfect (because being
relatively perfect is an \'etale local property) and that
$d$ is adjoint to an isomorphism $Lf_i^*E_i \to E$.

\medskip\noindent
By exactly the same argument as used in
the proof of Lemma \ref{lemma-relative-descend-homomorphisms}
using the induction principle
(Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-induction-principle})
we reduce to the case where both $X_0$ and $Y_0$
are affine: first work with quasi-compact and quasi-separated objects
in $(Y_0)_{spaces, \etale}$ to reduce to
$Y_0$ affine, then work with quasi-compact and quasi-separated object
in $(X_0)_{spaces, \etale}$ to reduce to $X_0$ affine.
In the affine case the result follows from the case of schemes which is
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-descend-relatively-perfect}.
The translation into the case for schemes is done by
Lemma \ref{lemma-affine-locally-rel-perfect}.
\end{proof}

\begin{lemma}
\label{lemma-derived-pushforward-rel-perfect}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is flat, proper, and
of finite presentation. Let $E \in D(\mathcal{O}_X)$ be $Y$-perfect.
Then $Rf_*E$ is a perfect object of $D(\mathcal{O}_Y)$
and its formation commutes with arbitrary base change.
\end{lemma}

\begin{proof}
The statement on base change is Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-base-change-tensor} (with
$\mathcal{G}^\bullet$ equal to $\mathcal{O}_X$ in degree $0$).
Thus it suffices to show that $Rf_*E$ is a perfect object. We will reduce
to the case where $Y$ is Noetherian affine by a limit argument.

\medskip\noindent
The question is \'etale local on $Y$, hence we may assume $Y$ is affine.
Say $Y = \Spec(R)$. We write $R = \colim R_i$ as a filtered colimit
of Noetherian rings $R_i$. By Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-finite-presentation}
there exists an $i$ and an algebraic space
$X_i$ of finite presentation over $R_i$
whose base change to $R$ is $X$. By
Limits of Spaces, Lemmas \ref{spaces-limits-lemma-eventually-proper} and
\ref{spaces-limits-lemma-descend-flat}
we may assume $X_i$ is proper and flat over $R_i$.
By Lemma \ref{lemma-descend-relatively-perfect}
we may assume there exists a $R_i$-perfect object $E_i$ of
$D(\mathcal{O}_{X_i})$ whose pullback to $X$ is $E$.
Applying Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-perfect-direct-image}
to $X_i \to \Spec(R_i)$ and $E_i$ and using the
base change property already shown we obtain the result.
\end{proof}

\begin{lemma}
\label{lemma-compute-ext-rel-perfect}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
Let $E, K \in D(\mathcal{O}_X)$.
Assume
\begin{enumerate}
\item $Y$ is quasi-compact and quasi-separated,
\item $f$ is proper, flat, and of finite presentation,
\item $E$ is $Y$-perfect,
\item $K$ is pseudo-coherent.
\end{enumerate}
Then there exists a pseudo-coherent $L \in D(\mathcal{O}_Y)$ such that
$$
Rf_*R\SheafHom(K, E) = R\SheafHom(L, \mathcal{O}_Y)
$$
and the same is true after arbitrary base change: given
$$
\vcenter{
\xymatrix{
X' \ar[r]_{g'} \ar[d]_{f'} &
X \ar[d]^f \\
Y' \ar[r]^g &
Y
}
}
\quad\quad
\begin{matrix}
\text{cartesian, then we have } \\
Rf'_*R\SheafHom(L(g')^*K, L(g')^*E) \\
= R\SheafHom(Lg^*L, \mathcal{O}_{Y'})
\end{matrix}
$$
\end{lemma}

\begin{proof}
Since $Y$ is quasi-compact and quasi-separated, the same is true for $X$.
By Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-pseudo-coherent-hocolim} we can write
$K = \text{hocolim} K_n$ with $K_n$ perfect and $K_n \to K$ inducing
an isomorphism on truncations $\tau_{\geq -n}$. Let $K_n^\vee$
be the dual perfect complex
(Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}).
We obtain an inverse system $\ldots \to K_3^\vee \to K_2^\vee \to K_1^\vee$
of perfect objects. By Lemma \ref{lemma-perfect-relatively-perfect}
we see that $K_n^\vee \otimes_{\mathcal{O}_X} E$ is $Y$-perfect.
Thus we may apply Lemma \ref{lemma-derived-pushforward-rel-perfect}
to $K_n^\vee \otimes_{\mathcal{O}_X} E$ and we obtain an inverse system
$$
\ldots \to M_3 \to M_2 \to M_1
$$
of perfect complexes on $Y$ with
$$
M_n = Rf_*(K_n^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} E) =
Rf_*R\SheafHom(K_n, E)
$$
Moreover, the formation of these complexes commutes with any
base change, namely $Lg^*M_n =
Rf'_*((L(g')^*K_n)^\vee \otimes_{\mathcal{O}_{X'}}^\mathbf{L} L(g')^*E) =
Rf'_*R\SheafHom(L(g')^*K_n, L(g')^*E)$.

\medskip\noindent
As $K_n \to K$ induces an isomorphism on $\tau_{\geq -n}$, we see that
$K_n \to K_{n + 1}$ induces an isomorphism on $\tau_{\geq -n}$.
It follows that $K_{n + 1}^\vee \to K_n^\vee$
induces an isomorphism on $\tau_{\leq n}$ as
$K_n^\vee = R\SheafHom(K_n, \mathcal{O}_X)$.
Suppose that $E$ has tor amplitude in $[a, b]$ as a complex
of $f^{-1}\mathcal{O}_Y$-modules. Then the same is true after
any base change, see
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-tor-independence-and-tor-amplitude}.
We find that
$K_{n + 1}^\vee \otimes_{\mathcal{O}_X} E \to
K_n^\vee \otimes_{\mathcal{O}_X} E$
induces an isomorphism on $\tau_{\leq n + a}$
and the same is true after any base change.
Applying the right derived functor $Rf_*$
we conclude the maps $M_{n + 1} \to M_n$
induce isomorphisms on $\tau_{\leq n + a}$
and the same is true after any base change.
Choose a distinguished triangle
$$
M_{n + 1} \to M_n \to C_n \to M_{n + 1}[1]
$$
Pick $y \in |Y|$. Choose an elementary \'etale neighbourhood
$(U, u) \to (Y, y)$; this is possible by
Decent Spaces, Lemma
\ref{decent-spaces-lemma-decent-space-elementary-etale-neighbourhood}.
Take $Y'$ equal to the spectrum of the residue field at $u$.
Pull back to see that $C_n|_U \otimes_{\mathcal{O}_U}^\mathbf{L} \kappa(u)$
has nonzero cohomology only in degrees $\geq n + a$. By
More on Algebra, Lemma
\ref{more-algebra-lemma-lift-perfect-from-residue-field}
we see that the perfect complex $C_n|_U$ has tor amplitude in
$[n + a, m_n]$ for some integer $m_n$ and after possibly shrinking $U$.
Thus $C_n$ has tor amplitude in $[n + a, m_n]$ for some integer $m_n$
(because $Y$ is quasi-compact).
In particular, the dual perfect complex $C_n^\vee$ has tor amplitude in
$[-m_n, -n - a]$.

\medskip\noindent
Let $L_n = M_n^\vee$ be the dual perfect complex. The
conclusion from the discussion in the previous paragraph is that
$L_n \to L_{n + 1}$ induces isomorphisms on $\tau_{\geq -n - a}$.
Thus $L = \text{hocolim} L_n$ is pseudo-coherent, see
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-pseudo-coherent-hocolim}.
Since we have
$$
R\SheafHom(K, E) = R\SheafHom(\text{hocolim} K_n, E) =
R\lim R\SheafHom(K_n, E) = R\lim K_n^\vee \otimes_{\mathcal{O}_X} E
$$
(Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-colim-and-lim-of-duals})
and since $R\lim$ commutes with $Rf_*$ we find that
$$
Rf_*R\SheafHom(K, E) = R\lim M_n = R\lim R\SheafHom(L_n, \mathcal{O}_Y) =
R\SheafHom(L, \mathcal{O}_Y)
$$
This proves the formula over $Y$. Since the construction of $M_n$ is
compatible with base chance, the formula continues to hold after
any base change.
\end{proof}

\begin{remark}
\label{remark-compare-L}
The reader may have noticed the similarity between
Lemma \ref{lemma-compute-ext-rel-perfect} and
Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-compute-ext}.
Indeed, the pseudo-coherent complex $L$ of
Lemma \ref{lemma-compute-ext-rel-perfect}
may be characterized as the unique pseudo-coherent complex
on $Y$ such that there are functorial isomorphisms
$$
\Ext^i_{\mathcal{O}_Y}(L, \mathcal{F}) \longrightarrow
\Ext^i_{\mathcal{O}_X}(K,
E \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*\mathcal{F})
$$
compatible with boundary maps for $\mathcal{F}$ ranging over
$\QCoh(\mathcal{O}_Y)$. If we ever need this we will
formulate a precise result here and give a detailed proof.
\end{remark}

\begin{lemma}
\label{lemma-bounded-on-fibres}
Let $S$ be a scheme. Let $X$ be an algebraic space over $S$ such that
the structure morphism $f : X \to S$ is flat and
locally of finite presentation. Let $E$ be a pseudo-coherent
object of $D(\mathcal{O}_X)$. The following are equivalent
\begin{enumerate}
\item $E$ is $S$-perfect, and
\item $E$ is locally bounded below and for every point $s \in S$
the object $L(X_s \to X)^*E$ of $D(\mathcal{O}_{X_s})$
is locally bounded below.
\end{enumerate}
\end{lemma}

\begin{proof}
Since everything is local we immediately reduce to the
case that $X$ and $S$ are affine, see Lemma
\ref{lemma-affine-locally-rel-perfect}.
This case is handled by
Derived Categories of Schemes, Lemma \ref{perfect-lemma-bounded-on-fibres}.
\end{proof}

\begin{lemma}
\label{lemma-characterize-relatively-perfect}
Let $A$ be a ring. Let $X$ be an algebraic space separated, of
finite presentation, and flat over $A$. Let $K \in D_\QCoh(\mathcal{O}_X)$.
If  $R \Gamma (X, E \otimes^\mathbf{L} K)$ is perfect in
$D(A)$ for every perfect $E \in D(\mathcal{O}_X)$, then $K$ is
$\Spec(A)$-perfect.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-characterize-pseudo-coh-improved},
$K$ is pseudo-coherent relative to $A$. By Lemma
\ref{lemma-relative-pseudo-coherent-is-moot},
$K$ is pseudo-coherent in $D(\mathcal{O}_X)$.
By Derived Categories of Spaces, Proposition
\ref{spaces-perfect-proposition-detecting-bounded-below}
we see that $K$ is in $D^-(\mathcal{O}_X)$.
Let $\mathfrak{p}$ be a prime ideal of $A$ and denote
$i : Y \to X$ the inclusion of the scheme theoretic
fibre over $\mathfrak{p}$, i.e., $Y$ is a scheme over $\kappa(\mathfrak p)$.
By Lemma \ref{lemma-bounded-on-fibres},
we will be done if we can show  $Li^*(K)$ is bounded below. 
Let $G \in D_{perf} (\mathcal{O}_X)$ be a perfect
complex which generates $D_\QCoh (\mathcal{O}_X)$,
see Derived Categories of Spaces, Theorem
\ref{spaces-perfect-theorem-bondal-van-den-Bergh}.
We have
\begin{align*}
R\Hom _{\mathcal{O}_Y}(Li^*(G), Li^*(K))
& =
R\Gamma(Y, Li^*(G ^\vee \otimes ^\mathbf{L} K)) \\
& =
R\Gamma(X, G^\vee \otimes ^{\mathbf{L}} K)
\otimes^\mathbf{L}_A \kappa(\mathfrak{p})
\end{align*}
The first equality uses that $Li^*$ preserves perfect objects and duals
and Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-dual-perfect-complex}; we omit
some details. The second equality follows from
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-compare-base-change}
as $X$ is flat over $A$. It follows from our hypothesis that this is a
perfect object of $D(\kappa(\mathfrak{p}))$. The object
$Li^*(G) \in D_{perf}(\mathcal{O}_Y)$  generates $D_\QCoh(\mathcal{O}_Y)$ by
Derived Categories of Spaces, Remark
\ref{spaces-perfect-remark-pullback-generator}.
Hence Derived Categories of Spaces, Proposition
\ref{spaces-perfect-proposition-detecting-bounded-below}
now implies that $Li^*(K)$ is bounded below and we win.
\end{proof}














\section{Theorem of the cube}
\label{section-theorem-cube}

\noindent
This section is the analogue of More on Morphisms, Section
\ref{more-morphisms-section-theorem-cube}.
The following lemma tells us that the diagonal of the Picard
functor is representable by locally closed immersions under
the assumptions made in the lemma.

\begin{lemma}
\label{lemma-diagonal-picard-flat-proper}
Let $S$ be a scheme.
Let $f : X \to Y$ be a flat, proper morphism of finite presentation
of algebraic spaces over $S$.
Let $\mathcal{E}$ be a finite locally free $\mathcal{O}_X$-module.
For a morphism $g : Y' \to Y$ consider the base change diagram
$$
\xymatrix{
X' \ar[d]_{f'} \ar[r]_{g'} & X \ar[d]^f \\
Y' \ar[r]^g & Y
}
$$
Assume $\mathcal{O}_{Y'} \to f'_*\mathcal{O}_{X'}$ is an
isomorphism for all $g : Y' \to Y$.
Then there exists an immersion $j : Z \to Y$ of finite presentation
such that a morphism $g : Y' \to Y$ factors through $Z$ if and only if
there exists a finite locally free $\mathcal{O}_{Y'}$-module $\mathcal{N}$
with $(f')^*\mathcal{N} \cong (g')^*\mathcal{L}$.
\end{lemma}

\begin{proof}
Let $y : \Spec(k) \to Y$ be a field valued point.
Then the fibre $X_y$ of $f$ at $y$ is connected by our assumption
that $H^0(X_y, \mathcal{O}_{X_y}) = k$. Thus the rank of
$\mathcal{E}$ is constant on the fibres. Since $f$ is open
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-fppf-open})
and closed we conclude that there is a decomposition $Y = \coprod Y_r$
of $Y$ into open and closed subspaces such that $\mathcal{E}$
has constant rank $r$ on the inverse image of $Y_r$.
Thus we may assume $\mathcal{E}$ has constant rank $r$.
We will denote $\mathcal{E}^\vee = \SheafHom(\mathcal{E}, \mathcal{O}_X)$
the dual rank $r$ module.

\medskip\noindent
By cohomology and base change (more precisely by
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-flat-proper-perfect-direct-image-general})
we see that $E = Rf_*\mathcal{E}$ is a perfect object of the
derived category of $Y$ and that its formation commutes with
arbitrary change of base. Similarly for $E' = Rf_*\mathcal{E}^\vee$.
Since there is never any cohomology in degrees $< 0$, we see that
$E$ and $E'$ have (locally) tor-amplitude in $[0, b]$ for some $b$.
Observe that for any $g : Y' \to Y$ we have
$f'_*((g')^*\mathcal{E}) = H^0(Lg^*E)$ and
$f'_*((g')^*\mathcal{E}^\vee) = H^0(Lg^*E')$.
Let $j : Z \to Y$ and $j' : Z' \to Y$ be the locally closed
immersions constructed in Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-locally-closed-where-H0-locally-free}
for $E$ and $E'$ with $a = 0$ and $r = r$; these are characterized
by the property that $H^0(Lj^*E)$ and $H^0((j')^*E')$
are locally free modules of rank $r$ compatible with pullback.

\medskip\noindent
Let $g : Y' \to Y$ be a morphism. If there exists an $\mathcal{N}$
as in the lemma, then, using the projection formula
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-projection-formula},
we see that the modules
$$
f'_*((g')^*\mathcal{E}) \cong
f'_*((f')^*\mathcal{N}) \cong
\mathcal{N} \otimes_{\mathcal{O}_{Y'}} f'_*\mathcal{O}_{X'} \cong
\mathcal{N}\quad\text{and similarly }\quad
f'_*((g')^*\mathcal{E}^\vee) \cong \mathcal{N}^\vee
$$
are locally free of rank $r$ and remain locally free of rank $r$
after any further base change $Y'' \to Y'$.
Hence in this case $g : Y' \to Y$ factors through $j$ and through $j'$.
Thus we may replace $Y$ by $Z \times_Y Z'$ and assume that
$f_*\mathcal{E}$ and $f_*\mathcal{E}^\vee$ are locally free
$\mathcal{O}_Y$-modules of rank $r$
whose formation commutes with arbitrary change of base.

\medskip\noindent
In this situation if $g : Y' \to Y$ is a morphism and there exists an
$\mathcal{N}$ as in the lemma, then the map (cup product in degree $0$)
$$
f'_*((g')^*\mathcal{E})
\otimes_{\mathcal{O}_{Y'}}
f'_*((g')^*\mathcal{E}^\vee)
\longrightarrow \mathcal{O}_{Y'}
$$
is a perfect pairing. Conversely, if this cup product map is a
perfect pairing, then we see that locally on $Y'$ we have
a basis of sections
$\sigma_1, \ldots, \sigma_r$ in $f'_*((g')^*\mathcal{L})$ and
$\tau_1, \ldots, \tau_r$ in
$f'_*((g')^*\mathcal{E}^\vee)$ whose products satisfy
$\sigma_i \tau_j = \delta_{ij}$. Thinking of $\sigma_i$
as a section of $(g')^*\mathcal{L}$ on $X'$
and $\tau_j$ as a section of $(g')^*\mathcal{L}^\vee$ on $X'$,
we conclude that
$$
\sigma_1, \ldots, \sigma_r :
\mathcal{O}_{X'}^{\oplus r}
\longrightarrow
(g')^*\mathcal{E}
$$
is an isomorphism with inverse given by
$$
\tau_1, \ldots, \tau_r :
(g')^*\mathcal{E}
\longrightarrow
\mathcal{O}_{X'}^{\oplus r}
$$
In other words, we see that
$(f')^*f'_*(g')^*\mathcal{E} \cong (g')^*\mathcal{E}$.
But the condition that the cup product is nondegenerate
picks out a retrocompact open subscheme (namely, the locus where a suitable
determinant is nonzero) and the proof is complete.
\end{proof}









\section{Descent of finiteness properties of complexes}
\label{section-descent-finiteness}

\noindent
This section is the analogue of More on Morphisms,
Section \ref{more-morphisms-section-descent-finiteness}
and
Derived Categories of Schemes, Section
\ref{perfect-section-descent-finiteness}.

\begin{lemma}
\label{lemma-pseudo-coherent-descends-fpqc}
Let $S$ be a scheme. Let $\{f_i : X_i \to X\}$ be an fpqc covering of
algebraic spaces over $S$. Let $E \in D_\QCoh(\mathcal{O}_X)$.
Let $m \in \mathbf{Z}$. Then $E$ is $m$-pseudo-coherent if and only if each
$Lf_i^*E$ is $m$-pseudo-coherent.
\end{lemma}

\begin{proof}
Pullback always preserves $m$-pseudo-coherence, see
Cohomology on Sites, Lemma
\ref{sites-cohomology-lemma-pseudo-coherent-pullback}.
Thus it suffices to assume $Lf_i^*E$ is $m$-pseudo-coherent
and to prove that $E$ is $m$-pseudo-coherent.
Then first we may assume $X_i$ is a scheme for all $i$, see
Topologies on Spaces, Lemma \ref{spaces-topologies-lemma-refine-fpqc-schemes}.
Next, choose a  surjective \'etale morphism $U \to X$ where $U$ is a scheme.
Then $U_i = U \times_X X_i$ is a scheme and we obtain an fpqc covering
$\{U_i \to U\}$ of schemes, see
Topologies on Spaces, Lemma
\ref{spaces-topologies-lemma-recognize-fpqc-covering}.
We know the result is true for
$\{U_i \to U\}_{i \in I}$ by the case for schemes, see
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-pseudo-coherent-descends-fpqc}.
On the other hand, the restriction $E|_U$ comes from
an object of $D_\QCoh(\mathcal{O}_U)$ (defined using the Zariski
topology and the ``usual'' structure sheaf of $U$), see
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site}.
The lemma follows as the two notions of pseudo-coherent
(\'etale and Zariski) agree by
Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-descend-pseudo-coherent}.
\end{proof}

\begin{lemma}
\label{lemma-tor-amplitude-descends-fppf}
Let $S$ be a scheme. Let $\{g_i : Y_i \to Y\}$ be an fpqc covering of
algebraic spaces over $S$. Let $f : X \to Y$ be a morphism of algebraic
spaces and set $X_i = Y_i \times_Y X$ with projections $f_i : X_i \to Y_i$
and $g'_i : X_i \to X$. Let $E \in D_\QCoh(\mathcal{O}_X)$.
Let $a, b \in \mathbf{Z}$. Then the following are equivalent
\begin{enumerate}
\item $E$ has tor amplitude in $[a, b]$ as an object of
$D(f^{-1}\mathcal{O}_Y)$, and
\item $L(g'_i)^*E$ has tor amplitude in $[a, b]$ as a object of
$D(f_i^{-1}\mathcal{O}_{Y_i})$ for all $i$.
\end{enumerate}
Also true if ``tor amplitude in $[a, b]$'' is replaced by
``locally finite tor dimension''.
\end{lemma}

\begin{proof}
Pullback preserves ``tor amplitude in $[a, b]$'' by
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-tor-independence-and-tor-amplitude}
Observe that $Y_i$ and $X$ are tor independent over $Y$
as $Y_i \to Y$ is flat. Let us assume (2) and prove (1).
We can compute tor dimension at stalks, see
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-tor-amplitude-stalk}
and Properties of Spaces, Theorem
\ref{spaces-properties-theorem-exactness-stalks}.
Let $\overline{x}$ be a geometric point of $X$. Choose
an $i$ and a geometric point $\overline{x}_i$ in $X_i$ with image
$\overline{x}$ in $X$. Then
$$
(L(g_i')^*E)_{\overline{x}_i} =
E_{\overline{x}}
\otimes_{\mathcal{O}_{X, \overline{x}}}^\mathbf{L}
\mathcal{O}_{X_, \overline{x}_i}
$$
Let $\overline{y}_i$ in $Y_i$ and $\overline{y}$ in $Y$
be the image of $\overline{x}_i$ and $\overline{x}$.
Since $X$ and $Y_i$ are tor independent over $Y$, we can apply
More on Algebra, Lemma \ref{more-algebra-lemma-base-change-comparison}
to see that the right hand side of the displayed formula is equal to
$E_{\overline{x}}
\otimes_{\mathcal{O}_{Y, \overline{y}}}^\mathbf{L}
\mathcal{O}_{Y_i, \overline{y}_i}$
in $D(\mathcal{O}_{Y_i, \overline{y}_i})$.
Since we have assume the tor amplitude of this is in
$[a, b]$, we conclude that the tor amplitude of
$E_{\overline{x}}$ in $D(\mathcal{O}_{Y, \overline{y}})$
is in $[a, b]$ by More on Algebra, Lemma
\ref{more-algebra-lemma-flat-descent-tor-amplitude}.
Thus (1) follows.

\medskip\noindent
Using some elementary topology the case
``locally finite tor dimension'' follows too.
\end{proof}

\noindent
The following lemmas do not really belong in this section.

\begin{lemma}
\label{lemma-thickening-pseudo-coherent}
Let $S$ be a scheme. Let $i : X \to X'$ be a finite order thickening of
algebraic spaces. Let $K' \in D(\mathcal{O}_{X'})$ be an object such that
$K = Li^*K'$ is pseudo-coherent. Then $K'$ is pseudo-coherent.
\end{lemma}

\begin{proof}
We first prove $K'$ has quasi-coherent cohomology sheaves; we urge
the reader to skip this part.
To do this, we may reduce to the case of a first order thickening, see
Section \ref{section-thickenings}. Let $\mathcal{I} \subset \mathcal{O}_{X'}$
be the quasi-coherent sheaf of ideals cutting out $X$.
Tensoring the short exact sequence
$$
0 \to \mathcal{I} \to \mathcal{O}_{X'} \to i_*\mathcal{O}_X \to 0
$$
with $K'$ we obtain a distinguished triangle
$$
K' \otimes_{\mathcal{O}_{X'}}^\mathbf{L} \mathcal{I}
\to K' \to
K' \otimes_{\mathcal{O}_{X'}}^\mathbf{L} i_*\mathcal{O}_X
\to
(K' \otimes_{\mathcal{O}_{X'}}^\mathbf{L} \mathcal{I})[1]
$$
Since $i_* = Ri_*$ and since we may view $\mathcal{I}$
as a quasi-coherent $\mathcal{O}_X$-module (as we have a first
order thickening) we may rewrite this as
$$
i_*(K \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{I})
\to K' \to
i_*K \to
i_*(K \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{I})[1]
$$
Please use Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-projection-formula-finite}
to identify the terms. Since $K$ is in
$D_\QCoh(\mathcal{O}_X)$ we conclude that
$K'$ is in $D_\QCoh(\mathcal{O}_{X'})$; this uses
Derived Categories of Spaces, Lemmas
\ref{spaces-perfect-lemma-pseudo-coherent},
\ref{spaces-perfect-lemma-quasi-coherence-tensor-product}, and
\ref{spaces-perfect-lemma-quasi-coherence-direct-image}.

\medskip\noindent
Assume $K'$ is in $D_\QCoh(\mathcal{O}_{X'})$.
The question is \'etale local on $X'$
hence we may assume $X'$ is affine.
In this case the result follows from the case of schemes
(More on Morphisms, Lemma
\ref{more-morphisms-lemma-thickening-pseudo-coherent}).
The translation into the language of schemes uses
Derived Categories of Spaces, Lemmas
\ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site} and
\ref{spaces-perfect-lemma-descend-pseudo-coherent} and
Remark \ref{spaces-perfect-remark-match-total-direct-images}.
\end{proof}

\begin{lemma}
\label{lemma-thickening-relatively-perfect}
Let $S$ be a scheme. Consider a cartesian diagram
$$
\xymatrix{
X \ar[r]_i \ar[d]_f & X' \ar[d]^{f'} \\
Y \ar[r]^j & Y'
}
$$
of algebraic spaces over $S$. Assume $X' \to Y'$ is flat and locally
of finite presentation and $Y \to Y'$ is a finite order thickening.
Let $E' \in D(\mathcal{O}_{X'})$. If $E = Li^*(E')$ is $Y$-perfect,
then $E'$ is $Y'$-perfect.
\end{lemma}

\begin{proof}
Recall that being $Y$-perfect for $E$ means $E$ is
pseudo-coherent and locally has finite tor dimension as a complex
of $f^{-1}\mathcal{O}_Y$-modules
(Definition \ref{definition-relatively-perfect}).
By Lemma \ref{lemma-thickening-pseudo-coherent}
we find that $E'$ is pseudo-coherent.
In particular, $E'$ is in $D_\QCoh(\mathcal{O}_{X'})$, see
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-pseudo-coherent}.
By Lemma \ref{lemma-affine-locally-rel-perfect}
this reduces us to the case of schemes.
The case of schemes is
More on Morphisms, Lemma
\ref{more-morphisms-lemma-thickening-relatively-perfect}.
\end{proof}

\begin{lemma}
\label{lemma-henselian-relatively-perfect}
Let $(R, I)$ be a pair consisting of a ring and an ideal $I$
contained in the Jacobson radical. Set $S = \Spec(R)$ and $S_0 = \Spec(R/I)$.
Let $X$ be an algebraic space over $R$ whose structure morphism
$f : X \to S$ is proper, flat, and of finite presentation.
Denote $X_0 = S_0 \times_S X$. Let $E \in D(\mathcal{O}_X)$
be pseudo-coherent. If the derived restriction $E_0$ of $E$
to $X_0$ is $S_0$-perfect, then $E$ is $S$-perfect.
\end{lemma}

\begin{proof}
Choose a surjective \'etale morphism $U \to X$ with $U$ affine.
Choose a closed immersion $U \to \mathbf{A}^d_S$.
Set $U_0 = S_0 \times_S U$.
The complex $E_0|_{U_0}$ has tor amplitude
in $[a, b]$ for some $a, b \in \mathbf{Z}$.
Let $\overline{x}$ be a geometric point of $X$.
We will show that the tor amplitude of
$E_{\overline{x}}$ over $R$ is in $[a - d, b]$.
This will finish the proof as the tor amplitude can be
read off from the stalks by
Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-tor-amplitude-stalk}
and Properties of Spaces, Theorem
\ref{spaces-properties-theorem-exactness-stalks}.

\medskip\noindent
Let $x \in |X|$ be the point determined by $\overline{x}$.
Recall that $|X| \to |S|$ is closed (by definition of proper morphisms).
Since $I$ is contained in the Jacobson radical, any nonempty closed
subset of $S$ contains a point of the closed subscheme $S_0$.
Hence we can find a specialization $x \leadsto x_0$ in $|X|$
with $x_0 \in |X_0|$. Choose $u_0 \in U_0$ mapping to $x_0$.
By Decent Spaces, Lemma \ref{decent-spaces-lemma-generalizations-lift-flat}
(or by Decent Spaces, Lemma \ref{decent-spaces-lemma-specialization}
which applies directly to \'etale morphisms)
we find a specialization $u \leadsto u_0$ in $U$
such that $u$ maps to $x$. We may lift $\overline{x}$
to a geometric point $\overline{u}$ of $U$ lying over $u$.
Then we have $E_{\overline{x}} = (E|_U)_{\overline{u}}$.

\medskip\noindent
Write $U = \Spec(A)$. Then $A$ is a flat, finitely presented
$R$-algebra which is a quotient of a polynomial $R$-algebra in
$d$-variables. The restriction $E|_U$ corresponds
(by Derived Categories of Spaces, Lemmas
\ref{spaces-perfect-lemma-pseudo-coherent},
\ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site}, and
\ref{spaces-perfect-lemma-descend-pseudo-coherent}
and
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-affine-compare-bounded} and
\ref{perfect-lemma-pseudo-coherent-affine})
to a pseudo-coherent object $K$ of $D(A)$.
Observe that $E_0$ corresponds to $K \otimes_A^\mathbf{L} A/IA$.
Let $\mathfrak q \subset \mathfrak q_0 \subset A$ be the prime
ideals corresponding to $u \leadsto u_0$.
Then
$$
E_{\overline{x}} =
(E|_U)_{\overline{u}} =
E_u \otimes_{\mathcal{O}_{U, u}}^\mathbf{L} \mathcal{O}_{U, \overline{u}} =
K_{\mathfrak q} \otimes_{A_\mathfrak q}^\mathbf{L} A_{\mathfrak q}^{sh}
$$
(some details omitted). Since $A_\mathfrak q \to A_\mathfrak q^{sh}$
is flat, the tor amplitude of this as an $R$-module is the same as
the tor amplitude of $K_\mathfrak q$ as an $R$-module
(More on Algebra, Lemma \ref{more-algebra-lemma-no-change-tor-amplitude}).
Also, $K_{\mathfrak q}$ is a localization of $K_{\mathfrak q_0}$.
Hence it suffices to show that $K_{\mathfrak q_0}$ has tor amplitude in
$[a - d, b]$ as a complex of $R$-modules.

\medskip\noindent
Let $I \subset \mathfrak p_0 \subset R$ be the prime
ideal corresponding to $f(x_0)$. Then we have
\begin{align*}
K \otimes_R^\mathbf{L} \kappa(\mathfrak p_0)
& =
(K \otimes_R^\mathbf{L} R/I) \otimes_{R/I}^\mathbf{L}
\kappa(\mathfrak p_0) \\
& =
(K \otimes_A^\mathbf{L} A/IA) \otimes_{R/I}^\mathbf{L} \kappa(\mathfrak p_0)
\end{align*}
the second equality because $R \to A$ is flat.
By our choice of $a, b$ this complex has cohomology
only in degrees in the interval $[a, b]$.
Thus we may finally apply
More on Algebra, Lemma
\ref{more-algebra-lemma-lift-from-fibre-relatively-perfect}
to $R \to A$, $\mathfrak q_0$, $\mathfrak p_0$ and $K$
to conclude.
\end{proof}







\section{Families of nodal curves}
\label{section-families-nodal}

\noindent
This section is the continuation of
Algebraic Curves, Section \ref{curves-section-families-nodal}.
Please also see that section for our choice
of terminology.

\medskip\noindent
The property ``at-worst-nodal of relative dimension $1$''
of morphisms of schemes is \'etale local on the source-and-target, see
Descent, Lemma \ref{descent-lemma-etale-local-source-target}
and
Algebraic Curves, Lemmas \ref{curves-lemma-nodal-family-etale-local-source},
\ref{curves-lemma-nodal-family-fpqc-local-target}, and
\ref{curves-lemma-nodal-family-postcompose-etale}.
It is also stable under base change and fpqc local on the target, see
Algebraic Curves, Lemmas \ref{curves-lemma-base-change-nodal-family} and
\ref{curves-lemma-nodal-family-fpqc-local-target}. Hence, by
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-local-source-target}
we may define the notion of an at-worst-nodal morphism of relative
dimension $1$ for algebraic spaces as follows and it agrees with the
already existing notion defined in
Morphisms of Spaces, Section \ref{spaces-morphisms-section-representable}
when the morphism is representable.

\begin{definition}
\label{definition-nodal-family}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
We say $f$ is {\it at-worst-nodal of relative dimension $1$}
if the equivalent conditions of
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-local-source-target}
hold with $\mathcal{P} =$``at-worst-nodal of relative dimension $1$''.
\end{definition}

\begin{lemma}
\label{lemma-base-change-nodal}
The property of being at-worst-nodal of relative dimension $1$
is preserved under base change.
\end{lemma}

\begin{proof}
See
Morphisms of Spaces, Remark \ref{spaces-morphisms-remark-base-change-P}
and
Algebraic Curves, Lemma \ref{curves-lemma-base-change-nodal-family}.
\end{proof}

\begin{lemma}
\label{lemma-nodal-local}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$.
The following are equivalent:
\begin{enumerate}
\item $f$ is at-worst-nodal of relative dimension $1$,
\item for every scheme $Z$ and any morphism $Z \to Y$ the morphism
$Z \times_Y X \to Z$ is at-worst-nodal of relative dimension $1$,
\item for every affine scheme $Z$ and any morphism
$Z \to Y$ the morphism $Z \times_Y X \to Z$ is
at-worst-nodal of relative dimension $1$,
\item there exists a scheme $V$ and a surjective \'etale morphism
$V \to Y$ such that $V \times_Y X \to V$ is
at-worst-nodal of relative dimension $1$,
\item there exists a scheme $U$ and a surjective \'etale morphism
$\varphi : U \to X$ such that the composition $f \circ \varphi$
is at-worst-nodal of relative dimension $1$,
\item for every commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
where $U$, $V$ are schemes and the vertical arrows are \'etale
the top horizontal arrow is at-worst-nodal of relative dimension $1$,
\item there exists a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r] & V \ar[d] \\
X \ar[r] & Y
}
$$
where $U$, $V$ are schemes, the vertical arrows are \'etale, and
$U \to X$ is surjective such that the top horizontal arrow is
at-worst-nodal of relative dimension $1$, and
\item there exist Zariski coverings $Y = \bigcup_{i \in I} Y_i$,
and $f^{-1}(Y_i) = \bigcup X_{ij}$ such that
each morphism $X_{ij} \to Y_i$ is
at-worst-nodal of relative dimension $1$.
\end{enumerate}
\end{lemma}

\begin{proof}
Omitted.
\end{proof}

\noindent
The following lemma tells us that we can check whether a morphism
is at-worst-nodal of relative dimension $1$ on the fibres.

\begin{lemma}
\label{lemma-locus-where-nodal}
Let $S$ be a scheme.
Let $f : X \to Y$ be a morphism of algebraic spaces over $S$
which is flat and locally of finite presentation. Then there
is a maximal open subspace $X' \subset X$ such that $f|_{X'} : X' \to Y$
is at-worst-nodal of relative dimension $1$. Moreover, formation
of $X'$ commutes with arbitrary base change.
\end{lemma}

\begin{proof}
Choose a commutative diagram
$$
\xymatrix{
U \ar[d] \ar[r]_h & V \ar[d] \\
X \ar[r]^f & Y
}
$$
where $U$, $V$ are schemes, the vertical arrows are \'etale, and
$U \to X$ is surjective. By the lemma for the case of schemes
(Algebraic Curves, Lemma \ref{curves-lemma-locus-where-nodal})
we find a maximal open subscheme $U' \subset U$
such that $h|_{U'} : U' \to V$ is at-worst-nodal of relative dimension $1$
and such that formation of $U'$ commutes with base change.
Let $X' \subset X$ be the open subspace whose points correspond
to the open subset $\Im(|U'| \to |X|)$.
By Lemma \ref{lemma-nodal-local} we see that $X' \to Y$ is
at-worst-nodal of relative dimension $1$ and that $X'$ is the
largest open subspace with this property (this also implies
that $U'$ is the inverse image of $X'$ in $U$, but we do
not need this). Since the same is true after base change
the proof is complete.
\end{proof}




\section{The resolution property}
\label{section-resolution-property}

\noindent
We continue the discussion in Derived Categories of Spaces, Section
\ref{spaces-perfect-section-resolution-property}.

\begin{situation}
\label{situation-descend-resolution-property}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Let $V \to X$ be a surjective \'etale
morphism where $V$ is an affine scheme (such a thing exists by
Properties of Spaces, Lemma
\ref{spaces-properties-lemma-quasi-compact-affine-cover}).
Choose a commutative diagram
$$
\xymatrix{
V \ar[rd]_\varphi \ar[rr]_j & & Y \ar[ld]^\pi \\
& X
}
$$
where $j$ is an open immersion and $\pi$ is a finite morphism
of algebraic spaces (such a diagram exists by
Lemma \ref{lemma-quasi-finite-separated-pass-through-finite}).
Let $\mathcal{I} \subset \mathcal{O}_Y$ be a finite type
quasi-coherent sheaf of ideals on $Y$ with
$V(\mathcal{I}) = Y \setminus j(V)$ (such a sheaf of ideals exists
by Limits of Spaces, Lemma
\ref{spaces-limits-lemma-quasi-coherent-finite-type-ideals}).
\end{situation}

\begin{lemma}
\label{lemma-surjection-in-Noetherian-case}
In Situation \ref{situation-descend-resolution-property}, assume
$X$ is Noetherian. Then for any coherent $\mathcal{O}_X$-module
$\mathcal{F}$ there exist $r \geq 0$,
integers $n_1, \ldots, n_r \geq 0$, and a surjection
$$
\bigoplus\nolimits_{i = 1, \ldots, r} \pi_*(\mathcal{I}^{n_i})
\longrightarrow \mathcal{F}
$$
of $\mathcal{O}_X$-modules.
\end{lemma}

\begin{proof}
Denote $\omega_{Y/X}$ the coherent $\mathcal{O}_Y$-module such that there
is an isomorphism
$$
\pi_*\omega_{Y/X} \cong
\SheafHom_{\mathcal{O}_X}(\pi_*\mathcal{O}_Y, \mathcal{O}_X)
$$
of $\pi_*\mathcal{O}_Y$-modules, see Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-affine-equivalence-modules} and
Descent on Spaces, Lemma \ref{spaces-descent-lemma-finite-over-finite-module}.
The canonical map $\mathcal{O}_X \to \pi_*\mathcal{O}_Y$
produces a canonical map
$$
\text{Tr}_\pi : \pi_*\omega_{Y/X} \longrightarrow \mathcal{O}_X
$$
Since $V$ is Noetherian affine we may choose sections
$$
s_1, \ldots, s_r \in
\Gamma(V, \pi^*\mathcal{F} \otimes_{\mathcal{O}_Y} \omega_{Y/X})
$$
generating the coherent module
$\pi^*\mathcal{F} \otimes_{\mathcal{O}_X} \omega_{Y/X}$
over $V$. By
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-homs-over-open}
we can choose integers $n_i \geq 0$ such that $s_i$
extends to a map
$s_i' : \mathcal{I}^{n_i} \to
\pi^*\mathcal{F} \otimes_{\mathcal{O}_Y} \omega_{Y/X}$.
Pushing to $X$ we obtain maps
$$
\sigma_i :
\pi_*\mathcal{I}^{n_i}
\xrightarrow{\pi_*s'_i}
\pi_*(\pi^*\mathcal{F} \otimes_{\mathcal{O}_Y} \omega_{Y/X}) =
\mathcal{F} \otimes_{\mathcal{O}_X} \pi_*\omega_{Y/X}
\xrightarrow{\text{Tr}_\pi} \mathcal{F}
$$
where the equality sign is
Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-finite-rings}.
To finish the proof we will show that the sum of these maps is surjective.

\medskip\noindent
Let $x \in |X|$ be a point of $X$. Let $v \in |V|$ be a point mapping to $x$.
We may choose an \'etale neighbourhood $(U, u) \to (X, x)$ such that
$$
U \times_X Y = W \coprod W'
$$
(disjoint union of algebraic spaces) such that $W \to U$ is an
isomorphism and such that the unique point $w \in W$ lying over
$u$ maps to $v$ in $V \subset Y$. To see this is true use
Lemma \ref{lemma-etale-splits-off-just-one-quasi-finite-part} and
\'Etale Morphisms, Lemma \ref{etale-lemma-etale-etale-local}.
After shrinking $U$ further if necessary we may assume $W$ maps into
$V \subset Y$ by the projection. Since the formation of $\omega_{Y/X}$
commutes with \'etale localization we see that
$$
\pi_*\omega_{Y/X}|_U = (\pi|_W)_*\omega_{W/U} \oplus (\pi|_{W'})_*\omega_{W'/U}
$$
We have $(\pi|_W)_*\omega_{W/U} = \mathcal{O}_U$ and this isomorphism
is given by the trace map $\text{Tr}_\pi|_U$ restricted
to the first summand in the decomposition above. Since $W$ maps
into $V$ we see that $\mathcal{I}^{n_i}|_W = \mathcal{O}_W$.
Hence
$$
\pi_*(\mathcal{I}^{n_i})|_U = \mathcal{O}_U \oplus
(W' \to U)_*(\mathcal{I}^{n_i}|_{W'})
$$
Chasing diagrams the reader sees (details omitted) that $\sigma_i|_U$
on the summand $\mathcal{O}_U$ is the map $\mathcal{O}_U \to \mathcal{F}$
corresponding to the section
$$
s_i|_W  \in
\Gamma(W,\pi^*\mathcal{F} \otimes_{\mathcal{O}_Y} \omega_{Y/X})
=
\Gamma(W, \mathcal{F}|_W \otimes_{\mathcal{O}_W} \omega_{W/U})
=
\Gamma(U, \mathcal{F})
$$
Since the sections $s_i$ generate the module
$\pi^*\mathcal{F} \otimes_{\mathcal{O}_Y} \omega_{Y/X}$
over $V$ and since $W$ maps into $V$ we conclude
that the restriction of $\bigoplus \sigma_i$ to $U$ is surjective.
Since $x$ was an arbitrary point the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-resolution-property-in-Noetherian-case}
In Situation \ref{situation-descend-resolution-property}, assume
$X$ is Noetherian. Then $X$ has the resolution property if and only
if $\pi_*\mathcal{I}$ is the quotient of a finite locally free
$\mathcal{O}_X$-module.
\end{lemma}

\begin{proof}
The module $\pi_*\mathcal{I}$ is coherent by
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-finite-pushforward-coherent}.
Hence if $X$ has the resolution property then $\pi_*\mathcal{I}$
is the quotient of a finite locally free $\mathcal{O}_X$-module.
Conversely, assume given a surjection $\mathcal{E} \to \pi_*\mathcal{I}$
for some finite locally free $\mathcal{O}_X$-module $\mathcal{E}$.
Observe that for all $n \geq 1$ there is a surjection
$$
\pi_*\mathcal{I} \otimes_{\mathcal{O}_X} \pi_*\mathcal{I}^n
\longrightarrow
\pi_*\mathcal{I}^{n + 1}
$$
Hence $\mathcal{E}^{\otimes n}$ surjects onto
$\pi_*\mathcal{I}^n$ for all $n \geq 1$. We conclude that $X$
has the resolution property if we combine this with the
result of Lemma \ref{lemma-surjection-in-Noetherian-case}.
\end{proof}

\begin{lemma}
\label{lemma-resolution-property-one-sheaf}
In Situation \ref{situation-descend-resolution-property},
the algebraic space $X$ has the resolution property
if and only if $\pi_*\mathcal{I}$ is the quotient of a
finite locally free $\mathcal{O}_X$-module.
\end{lemma}

\begin{proof}
The pushforward $\pi_*\mathcal{G}$ of a finite type
quasi-coherent $\mathcal{O}_Y$-module $\mathcal{G}$ is a finite
type quasi-coherent $\mathcal{O}_X$-module by
Descent on Spaces, Lemma
\ref{spaces-descent-lemma-finite-over-finite-module}.
In particular, if $X$ has the resolution property, then $\pi_*\mathcal{I}$
is the quotient of a finite locally free $\mathcal{O}_X$-module by
Derived Categories of Spaces, Definition
\ref{spaces-perfect-definition-resolution-property}.

\medskip\noindent
Assume that we have a surjection $\mathcal{E} \to \pi_*\mathcal{I}$
for some finite locally free $\mathcal{O}_X$-module $\mathcal{E}$.
In the rest of the proof we show that $X$ has the resolution property
by reducing to the Noetherian case handled in
Lemma \ref{lemma-resolution-property-in-Noetherian-case}.
We suggest the reader skip the rest of the proof.

\medskip\noindent
A first reduction is that we may view $X$ as an algebraic space over
$\Spec(\mathbf{Z})$, see
Spaces, Definition \ref{spaces-definition-base-change}.
(This doesn't affect the conditions nor the conclusion of the lemma.)

\medskip\noindent
By Limits of Spaces, Lemma
\ref{spaces-limits-lemma-finite-in-finite-and-finite-presentation}
we can write $Y = \lim Y_i$ with $Y_i$ finite and of finite
presentation over $X$ and where the transition maps are closed
immersions. Consider the closed subspace $Z = V(\mathcal{I})$ of $Y$.
Since $\mathcal{I}$ is of finite type, the morphism $Z \to Y$ is of
finite presentation. Hence we can find an $i$ and a morphism
$Z_i \to Y_i$ of finite presentation whose base change to $Y$
is $Z \to Y$, see Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-finite-presentation}.
For $i' \geq i$ denote $Z_{i'} = Z_i \times_{Y_i} Y_{i'}$.
After increasing $i$ we may assume $Z_i \to Y_i$ is a
closed immersion (of finite presentation), see Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-closed-immersion}. Denote
$\mathcal{I}_i \subset \mathcal{O}_{Y_i}$ the ideal
sheaf of $Z_i$ and denote $\pi_i : Y_i \to X$ the structure morphism.
Similarly for $i' \geq i$. Since $Z = \lim_{i' \geq i} Z_{i'}$ we have
$$
\pi_*\mathcal{I} = \colim \pi_{i', *}\mathcal{I}_{i'}
$$
The transition maps in the system are all surjective
as follows from the surjectivity of the maps
$\pi_{i, *}\mathcal{O}_{Y_i} \to \pi_{i', *}\mathcal{O}_{Y_{i'}}$
and the fact that $Z_{i'} = Z_i \times_{Y_i} Y_{i'}$.
By Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-finite-presentation-quasi-compact-colimit}
for some $i' \geq i$ the map $\mathcal{E} \to \pi_*\mathcal{I}$
lifts to a map $\mathcal{E} \to \pi_{i', *}\mathcal{I}_{i'}$.
After increasing $i'$ this map
$\mathcal{E} \to \pi_{i', *}\mathcal{I}_{i'}$
becomes surjective (since if not the colimit of the cokernels,
having surjective transition maps, is nonzero).
This reduces us to the case discussed in the next paragraph.

\medskip\noindent
Assume $X$ is an algebraic space over $\mathbf{Z}$ and that
$Y \to X$ is of finite presentation. By absolute Noetherian
approximation we can write $X = \lim X_i$ as a directed limit,
where each $X_i$ is a quasi-separated algebraic space of finite type
over $\mathbf{Z}$ and the transition morphisms are affine, see
Limits of Spaces, Proposition \ref{spaces-limits-proposition-approximate}.
Since $\pi : Y \to X$ is of finite presentation we can find an $i$
and a morphism $\pi_i : Y_i \to X_i$ of finite presentation
whose base change to $X$ is $\pi$, see
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-finite-presentation}.
After increasing $i$ we may assume $\pi_i$ is finite, see
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-finite}.
Next, we may assume there exists a finite locally
free $\mathcal{O}_{X_i}$-module $\mathcal{E}_i$
whose pullback to $X$ is $\mathcal{E}$, see
Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-invertible-modules}.
We may also assume there is a map
$\mathcal{E}_i \to \pi_{i, *}\mathcal{O}_{Y_i}$
whose pullback to $X$ is the composition
$\mathcal{E} \to \pi_*\mathcal{I} \to \pi_*\mathcal{O}_Y$, see
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-modules-finite-presentation}.
The cokernel
$$
\mathcal{E}_i \to \pi_{i, *}\mathcal{O}_{Y_i} \to \mathcal{Q}_i \to 0
$$
is a coherent $\mathcal{O}_{Y_i}$-module whose pullback to $X$
is the (finitely presented) cokernel $\mathcal{Q}$ of the map
$\mathcal{E} \to \pi_*\mathcal{O}_Y$. In other words, we have
$\mathcal{Q} = \pi_*(\mathcal{O}_Y/\mathcal{I})$. Consider
the map
$$
\mathcal{E}_i
\otimes_{\mathcal{O}_{X_i}}
\pi_{i, *} \mathcal{O}_{Y_i}
\longrightarrow
\pi_{i, *}\mathcal{O}_{Y_i}
\otimes_{\mathcal{O}_{X_i}}
\pi_{i, *} \mathcal{O}_{Y_i}
\to
\pi_{i, *} \mathcal{O}_{Y_i}
\to
\mathcal{Q}_i
$$
where the second arrow is given by the algebra structure
on $\pi_{i, *}\mathcal{O}_{Y_i}$. The pullback of this map
to $Y$ is zero because the image of $\mathcal{E} \to \pi_*\mathcal{O}_Y$
is the ideal $\pi_*\mathcal{I}$. Hence by
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-modules-finite-presentation}
after increasing $i$ we may assume the displayed composition
is zero. This exactly means that the imag of
$\mathcal{E}_i \to \pi_{i, *}\mathcal{O}_{Y_i}$
is of the form $\pi_{i, *}\mathcal{I}_i$
for some coherent ideal sheaf $\mathcal{I}_i \subset \mathcal{O}_{Y_i}$.
Since $\mathcal{E}_i \to \pi_{i, *}\mathcal{O}_{Y_i}$
pulls back to $\mathcal{E} \to \pi_*\mathcal{O}_Y$ we
see that the pullback of $\mathcal{I}_i$ to $Y$ generates $\mathcal{I}$.
Denote $V_i \subset Y_i$ the open subspace whose complement
is $V(\mathcal{I}_i) \subset Y_i$. Then $V$ is the inverse image
of $V_i$ by the comments above. After increasing $i$ we may assume
that $V_i$ is affine and that $\pi_i|_{V_i} : V_i \to X_i$ is 
\'etale, see
Limits of Spaces, Lemmas
\ref{spaces-limits-lemma-limit-is-affine} and
\ref{spaces-limits-lemma-descend-etale}.
Having said all of this, we may apply
Lemma \ref{lemma-resolution-property-in-Noetherian-case}
to conclude that $X_i$ has the
resolution property. Since $X \to X_i$ is affine
we conclude that $X$ has the resolution property too
by Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-resolution-property-goes-up-affine}.
\end{proof}

\begin{lemma}
\label{lemma-resolution-property-descends}
Let $S$ be a scheme.
Let $X = \lim X_i$ be a limit of a direct system of quasi-compact
and quasi-separated algebraic spaces over $S$ with affine transition morphisms.
Then $X$ has the resolution property if and only if $X_i$ has
the resolution properties for some $i$.
\end{lemma}

\begin{proof}
If $X_i$ has the resolution property, then $X$ does by
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-resolution-property-goes-up-affine}.
Assume $X$ has the resolution property.
Choose $i \in I$. We may choose an affine scheme $V_i$ and a surjective
\'etale morphism $V_i \to X_i$ 
(Properties of Spaces, Lemma
\ref{spaces-properties-lemma-quasi-compact-affine-cover}).
We may choose an embedding $j : V_i \to Y_i$
with $Y_i$ finite and finitely presented over $X_i$
(Lemma \ref{lemma-quasi-finite-separated-pass-through-finite-addendum}).
We may choose a finite type
quasi-coherent ideal $\mathcal{I}_i \subset \mathcal{O}_{Y_i}$
such that $V_i = Y_i \setminus V(\mathcal{I}_i)$
(Limits of Spaces, Lemma
\ref{spaces-limits-lemma-quasi-coherent-finite-type-ideals}).
Denote $V \to Y \to X$ the base changes of $V_i \to Y_i \to X_i$
to $X$. Denote $\mathcal{I} \subset \mathcal{O}_Y$ the pullback
of the ideal $\mathcal{I}_i$. By the easy direction of
Lemma \ref{lemma-resolution-property-one-sheaf}
there exists a finite locally free $\mathcal{O}_X$-module
$\mathcal{E}$ and a surjection $\mathcal{E} \to \pi_*\mathcal{I}$.
Note that since $\pi_i : Y_i \to X_i$ is finite and of finite presentation
we also have that $\pi : Y \to X$ is finite and of finite presentation
and that the $\mathcal{O}_{X_i}$-modules
$\pi_{i, *}\mathcal{O}_{Y_i}$ and
$\pi_{i, *}(\mathcal{O}_{Y_i}/\mathcal{I}_i)$
are of finite presentation and pullback to $X$ to give
$\pi_*\mathcal{O}_Y$ and
$\pi_*(\mathcal{O}_Y/\mathcal{I})$. Thus by Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-modules-finite-presentation}
after increasing $i$ we can find a finite locally free
$\mathcal{O}_{X_i}$-module $\mathcal{E}_i$
and a map $\mathcal{E}_i \to \pi_{i, *}\mathcal{O}_{Y_i}$
whose base change to $X$ recovers the composition
$\mathcal{E} \to \pi_*\mathcal{I} \to \pi_*\mathcal{O}_Y$.
The pullbacks of the finitely presented $\mathcal{O}_{X_i}$-modules
$\Coker(\mathcal{E}_i \to \pi_{i, *}\mathcal{O}_{Y_i})$
and $\pi_{i, *}(\mathcal{O}_{Y_i}/\mathcal{I}_i)$
to $X$ agree as quotients of $\pi_*\mathcal{O}_Y$.
Hence by Limits of Spaces, Lemma
\ref{spaces-limits-lemma-descend-modules-finite-presentation}
we may assume that these agree, in other words that
the image of $\mathcal{E}_i \to \pi_{i, *}\mathcal{O}_{X_i}$
is equal to $\pi_{i, *}\mathcal{I}_i$.
Then we conclude that $X_i$ has the resolution property by
Lemma \ref{lemma-resolution-property-one-sheaf}.
\end{proof}

\begin{lemma}
\label{lemma-resolution-property-affine-diagonal}
Let $S$ be a scheme.
Let $X$ be a quasi-compact and quasi-separated algebraic space with
the resolution property. Then $X$ has affine diagonal over $\mathbf{Z}$
(as in Properties of Spaces, Definition
\ref{spaces-properties-definition-separated}).
\end{lemma}

\begin{proof}
We could prove this as in the case of schemes, but instead we will
deduce the lemma from the case of schemes.
First, we may and do assume $S = \Spec(\mathbf{Z})$.
Next, we choose a scheme $Y$ and a surjective integral morphism
$f : Y \to X$, see
Decent Spaces, Lemma \ref{decent-spaces-lemma-there-is-a-scheme-integral-over}.
Then $f$ is affine, hence $Y$ has the resolution property by
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-resolution-property-goes-up-affine}.
Hence by the case of schemes, the scheme $Y$ has affine diagonal, see
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-resolution-property-affine-diagonal}.
Next, we consider the commutative diagram
$$
\xymatrix{
Y \ar[d] \ar[rr]_{\Delta_Y} & & Y \times_{\mathbf{Z}} Y \ar[d] \\
X \ar[rr]^{\Delta_X} & & X \times_{\mathbf{Z}} X
}
$$
Observe that the right vertical arrow is integral, in particular
affine. Let $W \to X \times_{\mathbf{Z}} X$ be a morphism with $W$ affine.
Then we see that
$$
Y \times_{X \times_{\mathbf{Z}} X} W =
Y \times_{\Delta_Y, Y \times_{\mathbf{Z}} Y}
(Y \times_{\mathbf{Z}} Y) \times_{X \times_{\mathbf{Z}} X} W
$$
is affine. On the other hand, $Y \to X$ is integral and surjective
hence
$$
Y \times_{X \times_{\mathbf{Z}} X} W
\longrightarrow
X \times_{X \times_{\mathbf{Z}} X} W
$$
is integral surjective as the base change of $Y \to X$ to $W$.
We conclude that the target of this arrow is affine by
Limits of Spaces, Proposition \ref{spaces-limits-proposition-affine}.
It follows that $\Delta_X$ is affine as desired.
\end{proof}







\section{Blowing up and the resolution property}
\label{section-resolution-property-by-blowing-up}

\noindent
We prove that the resolution property is satisfied after a blowing up.

\begin{lemma}
\label{lemma-blow-up-resolution-property}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. Assume that $|X|$ has finitely many irreducible
components. There exists a dense quasi-compact open $U \subset X$
and a $U$-admissible blowing up $X' \to X$ such that the algebraic space
$X'$ has the resolution property.
\end{lemma}

\begin{proof}
By Limits of Spaces, Lemma
\ref{spaces-limits-lemma-there-is-a-scheme-finite-over-refined}
there exists a surjective, finite, and finitely presented morphism
$f : Y \to X$ where $Y$ is a scheme and a quasi-compact dense open
$U \subset X$ such that $f^{-1}(U) \to U$ is finite \'etale.
By More on Morphisms, Lemma \ref{more-morphisms-lemma-blow-up-ample-family}
there is a quasi-compact dense open $V \subset Y$ and a $V$-admissible
blowing up $Y' \to Y$ such that $Y'$ has an ample family of invertible
modules. After shrinking $U$ we may assume that $f^{-1}(U) \subset V$
(details omitted). Hence $f' : Y' \to X$ is finite \'etale over $U$
and in particular, the morphism $(f')^{-1}(U) \to U$ is finite locally free.
By Lemma \ref{lemma-finite-after-blowing-up} there is a $U$-admissible
blowing up $X' \to X$ such that the strict transform $Y''$ of $Y'$
is finite locally free over $X'$. Picture
$$
\xymatrix{
Y'' \ar[d] \ar[r]_g &
Y' \ar[r] &
Y \ar[d] \\
X' \ar[rr] & & X
}
$$
Since $g : Y'' \to Y'$ is a blowing up
(Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-strict-transform})
in the inverse image of the center of $X' \to X$, we see that
$g : Y'' \to Y'$ is projective and that there exists some 
$g$-ample invertible module on $Y''$. Hence by
More on Morphisms, Lemma \ref{more-morphisms-lemma-ample-family-ample-relative}
we see that $Y''$ has an ample family of invertible modules.
Hence $Y''$ has the resolution property, see
Derived Categories of Schemes, Lemma
\ref{perfect-lemma-resolution-property-ample-family}.
We conclude that $X'$ has the resolution property
by
Derived Categories of Spaces, Lemma
\ref{spaces-perfect-lemma-resolution-property-goes-down-finite-flat}.
\end{proof}

\begin{lemma}
\label{lemma-blow-up-resolution-property-filtered}
Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated
algebraic space over $S$. There exists a $t \geq 0$ and closed
subspaces
$$
X \supset Z_0 \supset Z_1 \supset \ldots \supset Z_t = \emptyset
$$
such that $Z_i \to X$ is of finite presentation,
$Z_0 \subset X$ is a thickening, and for each $i = 0, \ldots t - 1$
there exists a $(Z_i \setminus Z_{i - 1})$-admissible
blowing up $Z'_i \to Z_i$ such that $Z'_i$ has the resolution property.
\end{lemma}

\begin{proof}
In this paragraph we use absolute Noetherian approximation to reduce to the
case of algebraic spaces of finite presentation over $\Spec(\mathbf{Z})$.
We may view $X$ as an algebraic space over $\Spec(\mathbf{Z})$, see
Spaces, Definition \ref{spaces-definition-base-change} and
Properties of Spaces, Definition \ref{spaces-properties-definition-separated}.
Thus we may apply Limits of Spaces, Proposition
\ref{spaces-limits-proposition-approximate}.
It follows that we can find an affine morphism $X \to X_0$
with $X_0$ of finite presentation over $\mathbf{Z}$.
If we can prove the lemma for $X_0$, then we can pull back
the stratification and the centers of the blowing ups to $X$
and get the result for $X$; this uses that the resolution property
goes up along affine morphisms (Derived Categories of Spaces,
Lemma \ref{spaces-perfect-lemma-resolution-property-goes-up-affine}) and
that the strict transform of an affine morphism is affine -- details omitted.
This reduces us to the case discussed in the next paragraph.

\medskip\noindent
Assume $X$ is of finite presentation over $\mathbf{Z}$.
Then $X$ is Noetherian and $|X|$ is a Noetherian topological
space (with finitely many irreducible components) of finite dimension.
Hence we may use induction on $\dim(|X|)$.
By Lemma \ref{lemma-blow-up-resolution-property}
there exists a dense open $U \subset X$ and a $U$-admissible
blowing up $X' \to X$ such that $X'$ has the resolution property.
Set $Z_0 = X$ and let $Z_1 \subset X$ be the reduced closed subspace
with $|Z_1| = |X| \setminus |U|$.
By induction we find an integer $t \geq 0$ and a filtration
$$
Z_1 \supset Z_{1, 0} \supset Z_{1, 1} \supset \ldots
\supset Z_{1, t} = \emptyset
$$
by closed subspaces, where $Z_{1, 0} \to Z_1$ is a thickening
and there exist $(Z_{1, i} \setminus Z_{1, i + 1})$-admissible
blowing ups $Z'_{1, i} \to Z_{1, i}$ such that $Z'_{1, i}$
has the resolution property. Since $Z_1$ is reduced, we have $Z_1 = Z_{1, 0}$.
Hence we can set $Z_i = Z_{1, i - 1}$ and $Z'_i = Z'_{1, i - 1}$
for $i \geq 1$ and the lemma is proved.
\end{proof}










\input{chapters}

\bibliography{my}
\bibliographystyle{amsalpha}

\end{document}
